Skip to content

Commit f323248

Browse files
committed
qt/test: Use existing chainman in ::TestGUI (can be scripted-diff)
1 parent 6c15de1 commit f323248

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/qt/test/wallettests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ void TestGUI(interfaces::Node& node)
146146
LOCK2(wallet->cs_wallet, spk_man->cs_KeyStore);
147147
wallet->SetAddressBook(GetDestinationForKey(test.coinbaseKey.GetPubKey(), wallet->m_default_address_type), "", "receive");
148148
spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey());
149-
wallet->SetLastBlockProcessed(105, ::ChainActive().Tip()->GetBlockHash());
149+
wallet->SetLastBlockProcessed(105, node.context()->chainman->ActiveChain().Tip()->GetBlockHash());
150150
}
151151
{
152152
WalletRescanReserver reserver(*wallet);
153153
reserver.reserve();
154154
CWallet::ScanResult result = wallet->ScanForWalletTransactions(Params().GetConsensus().hashGenesisBlock, 0 /* block height */, {} /* max height */, reserver, true /* fUpdate */);
155155
QCOMPARE(result.status, CWallet::ScanResult::SUCCESS);
156-
QCOMPARE(result.last_scanned_block, ::ChainActive().Tip()->GetBlockHash());
156+
QCOMPARE(result.last_scanned_block, node.context()->chainman->ActiveChain().Tip()->GetBlockHash());
157157
QVERIFY(result.last_failed_block.IsNull());
158158
}
159159
wallet->SetBroadcastTransactions(true);

0 commit comments

Comments
 (0)