-
Notifications
You must be signed in to change notification settings - Fork 37k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AssertLockHeld assertions in CWallet::ListCoins #10605
Conversation
utACK 5c7a7de |
8392051
to
cc69e88
Compare
cc69e88
to
a6c6340
Compare
Dependent PR #10244 got merged, so this is now safe to merge too. Rebased 5c7a7de -> 8392051 (pr/listlock.1 -> pr/listlock.2) due to conflict with #11126 |
utACK 8740c61. |
Rebased 8740c61 -> 545e85e (pr/listlock.5 -> pr/listlock.6) due to conflict with #12920 |
Would you mind adding the clang lock annotations here as well? |
The last travis run for this pull request was 101 days ago and is thus outdated. To trigger a fresh travis build, this pull request should be closed and re-opened. |
@ryanofsky Are you still working on this? If so, mind to respond to my previous question from April? |
Missing locking annotations:
|
Closing as this seems to be inactive, let me know if you start work on this again and I should reopen it. |
This PR can be reopened. There isn't actually any work that needs to be done here since the clang errors @MarcoFalke reported were fixed by @skeees in #13423 (f393a53). |
@ryanofsky What I mean with locking annotations is the clang-annotations in the header file: diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 05ae9a1bbf..da326517c0 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -764,7 +764,7 @@ public:
/**
* Return list of available coins and locked coins grouped by non-change output address.
*/
- std::map<CTxDestination, std::vector<COutput>> ListCoins() const;
+ std::map<CTxDestination, std::vector<COutput>> ListCoins() const EXCLUSIVE_LOCKS_REQUIRED(cs_main, cs_wallet);
/**
* Find non-change parent output. Without these, it is only a best-guess runtime-check that the correct locks are taken for this method. |
Suggested by MarcoFalke <[email protected]> in bitcoin#10605 (comment)
utACK 545e85e (given that the clang lock annotations are included in this commit) |
utACK 62b6f0f |
utACK 62b6f0f. |
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from #10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
Suggested by MarcoFalke <[email protected]> in bitcoin/bitcoin#10605 (comment)
Suggested by MarcoFalke <[email protected]> in bitcoin#10605 (comment)
Suggested by MarcoFalke <[email protected]> in bitcoin#10605 (comment)
Summary: * Add AssertLockHeld assertions in CWallet::ListCoins * Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins Suggested by MarcoFalke <[email protected]> in bitcoin/bitcoin#10605 (comment) This is a backport of Core PR10605 Test Plan: * Build with clang and make sure there are no warning related to locks. * Build in debug mode and run the extended test suite. Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D4170
Summary: * Add AssertLockHeld assertions in CWallet::ListCoins * Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins Suggested by MarcoFalke <[email protected]> in bitcoin/bitcoin#10605 (comment) This is a backport of Core PR10605 Test Plan: * Build with clang and make sure there are no warning related to locks. * Build in debug mode and run the extended test suite. Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D4170
Summary: * Add AssertLockHeld assertions in CWallet::ListCoins * Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins Suggested by MarcoFalke <[email protected]> in bitcoin/bitcoin#10605 (comment) This is a backport of Core PR10605 Test Plan: * Build with clang and make sure there are no warning related to locks. * Build in debug mode and run the extended test suite. Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D4170
Summary: * Add AssertLockHeld assertions in CWallet::ListCoins * Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins Suggested by MarcoFalke <[email protected]> in bitcoin/bitcoin#10605 (comment) This is a backport of Core PR10605 Test Plan: * Build with clang and make sure there are no warning related to locks. * Build in debug mode and run the extended test suite. Reviewers: #bitcoin_abc, jasonbcox Reviewed By: #bitcoin_abc, jasonbcox Differential Revision: https://reviews.bitcoinabc.org/D4170
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
62b6f0f Add EXCLUSIVE_LOCKS_REQUIRED to CWallet::ListCoins (Russell Yanofsky) 545e85e Add AssertLockHeld assertions in CWallet::ListCoins (Russell Yanofsky) Pull request description: Fixes TODO from bitcoin#10295 Tree-SHA512: 2dd03a8217e5e1313aa2119cb530e0c0daf3ae3a751b6fdec611df57b8090201a90b52ff05f8f696e978a1344aaf21989d67a03beb5ef6ef79b77be38d04b451
Fixes TODO from #10295