Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented Aug 16, 2020

No description provided.

Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK b2ce2b97501f8642b79da024dd485545b67f5533

@achow101
Copy link
Member

In CWallet::FindNonChangeParentOutput, I think we should add an AssertLockHeld(cs_wallet) too.

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 20, 2020

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@promag promag force-pushed the 2020-08-deladdressbook branch from b2ce2b9 to abac436 Compare September 6, 2020 09:59
@promag
Copy link
Contributor Author

promag commented Sep 6, 2020

In CWallet::FindNonChangeParentOutput, I think we should add an AssertLockHeld(cs_wallet) too.

Done. Also rebased now that #19289 is merged.

@achow101
Copy link
Member

achow101 commented Sep 6, 2020

ACK abac436

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK abac436


const CTxOut& CWallet::FindNonChangeParentOutput(const CTransaction& tx, int output) const
{
AssertLockHeld(cs_wallet);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@achow101 per #19738 (comment) I'm curious why this should be added, as there is already an AssertLockHeld(cs_wallet); at the top of its caller, ListCoins(). For a future call from elsewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was based on #19289 which then raised #19773, and @achow101 suggestion should be done there, ListCoins eventually calls FindNonChangeParentOutput, and like IsTrusted, was missing the assertion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonatack I could split to a different commit though to be more correct, just LMK.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, I was only trying to understand the locking. This is fine.

Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-utACK abac436

@meshcollider meshcollider merged commit 78cb45d into bitcoin:master Sep 7, 2020
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 27, 2021
Summary: This is a backport of [[bitcoin/bitcoin#19738 | core#19738]]

Test Plan:
With TSAN:
`ninja all check-all`

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10190
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants