Add m_last_block_processed_height field in CWallet

At BlockConnected/BlockDisconnected, we rely on height of block
itself to know current height of wallet
This commit is contained in:
Antoine Riard committed 2019-11-05 12:59:16 -05:00
1 parent 10b4729e33
commit 5aacc3eff1
4 files changed
+54 -5

No files matched your search

+2
View File
@@ -139,10 +139,12 @@ void TestGUI(interfaces::Node& node)
wallet->LoadWallet(firstRun);
{
auto spk_man = wallet->GetLegacyScriptPubKeyMan();
auto locked_chain = wallet->chain().lock();
LOCK(wallet->cs_wallet);
AssertLockHeld(spk_man->cs_wallet);
wallet->SetAddressBook(GetDestinationForKey(test.coinbaseKey.GetPubKey(), wallet->m_default_address_type), "", "receive");
spk_man->AddKeyPubKey(test.coinbaseKey, test.coinbaseKey.GetPubKey());
wallet->SetLastBlockProcessed(105, ::ChainActive().Tip()->GetBlockHash());
}
{
auto locked_chain = wallet->chain().lock();