diff options
author | MacroFake <falke.marco@gmail.com> | 2022-05-06 16:58:53 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-08-16 17:26:40 +0200 |
commit | fac04cb6ba1d032587bd02eab2247fd655a548cd (patch) | |
tree | be6149a2a37ee881bccb119e08a1260a237d4a99 /src/wallet/test/spend_tests.cpp | |
parent | fac15ff673f0d6f84ea1eaae855597da02b0e510 (diff) | |
download | bitcoin-fac04cb6ba1d032587bd02eab2247fd655a548cd.tar.xz |
refactor: Add lock annotations to Active* methods
This is a refactor, putting the burden to think about thread safety to
the caller. Otherwise, there is a risk that the caller will assume
thread safety where none exists, as is evident in the previous two
commits.
Diffstat (limited to 'src/wallet/test/spend_tests.cpp')
-rw-r--r-- | src/wallet/test/spend_tests.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/test/spend_tests.cpp b/src/wallet/test/spend_tests.cpp index dc935a1a04..a75b014870 100644 --- a/src/wallet/test/spend_tests.cpp +++ b/src/wallet/test/spend_tests.cpp @@ -18,7 +18,7 @@ BOOST_FIXTURE_TEST_SUITE(spend_tests, WalletTestingSetup) BOOST_FIXTURE_TEST_CASE(SubtractFee, TestChain100Setup) { CreateAndProcessBlock({}, GetScriptForRawPubKey(coinbaseKey.GetPubKey())); - auto wallet = CreateSyncedWallet(*m_node.chain, m_node.chainman->ActiveChain(), m_args, coinbaseKey); + auto wallet = CreateSyncedWallet(*m_node.chain, WITH_LOCK(Assert(m_node.chainman)->GetMutex(), return m_node.chainman->ActiveChain()), m_args, coinbaseKey); // Check that a subtract-from-recipient transaction slightly less than the // coinbase input amount does not create a change output (because it would |