diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2020-01-16 16:13:15 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2020-03-31 08:36:02 -0500 |
commit | ade5f87971211bc67753f14a0d49e020142efc7c (patch) | |
tree | ab6c5b990c748e170565854ecdfe0894425a25a3 /src/qt/test | |
parent | f6da44ccce4cfff53433e665305a6fe0a01364e4 (diff) |
wallet refactor: Avoid use of Chain::Lock in qt wallettests
This is a step toward removing the Chain::Lock class and reducing cs_main
locking.
This change doesn't affect behavior.
Diffstat (limited to 'src/qt/test')
-rw-r--r-- | src/qt/test/wallettests.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index c1a0f63f73..6a136ba744 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -151,12 +151,9 @@ void TestGUI(interfaces::Node& node) wallet->SetLastBlockProcessed(105, ::ChainActive().Tip()->GetBlockHash()); } { - auto locked_chain = wallet->chain().lock(); - LockAssertion lock(::cs_main); - WalletRescanReserver reserver(wallet.get()); reserver.reserve(); - CWallet::ScanResult result = wallet->ScanForWalletTransactions(locked_chain->getBlockHash(0), {} /* stop_block */, reserver, true /* fUpdate */); + CWallet::ScanResult result = wallet->ScanForWalletTransactions(Params().GetConsensus().hashGenesisBlock, {} /* stop_block */, reserver, true /* fUpdate */); QCOMPARE(result.status, CWallet::ScanResult::SUCCESS); QCOMPARE(result.last_scanned_block, ::ChainActive().Tip()->GetBlockHash()); QVERIFY(result.last_failed_block.IsNull()); |