diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-18 16:23:37 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-05-18 16:23:43 +0200 |
commit | 629e250cbdee84c20d362da845d7aacfb84ddabe (patch) | |
tree | 47f8fecbe4cb08a93ad674249caf28f95873e307 /src/wallet/interfaces.cpp | |
parent | 139f789d7a9fbb64176d3897239f93f60019c521 (diff) | |
parent | a55db4ea1cf10e0ab4a6eb5cd1dd3bd95626fba0 (diff) | |
download | bitcoin-629e250cbdee84c20d362da845d7aacfb84ddabe.tar.xz |
Merge bitcoin/bitcoin#25148: refactor: Remove `NO_THREAD_SAFETY_ANALYSIS` from non-test/benchmarking code
a55db4ea1cf10e0ab4a6eb5cd1dd3bd95626fba0 Add more proper thread safety annotations (Hennadii Stepanov)
8cfe93e3fcf263bf059f738d5e7d9c94901a7c5a Add proper thread safety annotation to `CWallet::GetTxConflicts()` (Hennadii Stepanov)
ca446f2c59720c1575aeeab9c9d636d98ce8528c Add proper thread safety annotation to `CachedTxGetAvailableCredit()` (Hennadii Stepanov)
Pull request description:
In non-test/benchmarking code, there are three cases of the `NO_THREAD_SAFETY_ANALYSIS` annotation which are accompanied with `TODO` comments.
This PR adds proper thread safety annotations instead of `NO_THREAD_SAFETY_ANALYSIS`.
ACKs for top commit:
laanwj:
Code review ACK a55db4ea1cf10e0ab4a6eb5cd1dd3bd95626fba0
Tree-SHA512: 806d72eebc1edf088bfa435c8cd11465be0de6789798dd92abd008425516768acb864a73d834a49d412bb10f7fccfb47473f998cb72739dab6caeef6bcfaf191
Diffstat (limited to 'src/wallet/interfaces.cpp')
-rw-r--r-- | src/wallet/interfaces.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index b269137254..e1203817e0 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -80,7 +80,10 @@ WalletTx MakeWalletTx(CWallet& wallet, const CWalletTx& wtx) //! Construct wallet tx status struct. WalletTxStatus MakeWalletTxStatus(const CWallet& wallet, const CWalletTx& wtx) + EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) { + AssertLockHeld(wallet.cs_wallet); + WalletTxStatus result; result.block_height = wtx.state<TxStateConfirmed>() ? wtx.state<TxStateConfirmed>()->confirmed_block_height : |