mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
refactor: move first run detection to client code
This commit is contained in:
@@ -297,8 +297,7 @@ BOOST_AUTO_TEST_CASE(bnb_search_test)
|
||||
empty_wallet();
|
||||
{
|
||||
std::unique_ptr<CWallet> wallet = std::make_unique<CWallet>(m_node.chain.get(), "", CreateMockWalletDatabase());
|
||||
bool firstRun;
|
||||
wallet->LoadWallet(firstRun);
|
||||
wallet->LoadWallet();
|
||||
wallet->SetupLegacyScriptPubKeyMan();
|
||||
LOCK(wallet->cs_wallet);
|
||||
add_coin(*wallet, 5 * CENT, 6 * 24, false, 0, true);
|
||||
|
||||
@@ -8,8 +8,7 @@ WalletTestingSetup::WalletTestingSetup(const std::string& chainName)
|
||||
: TestingSetup(chainName),
|
||||
m_wallet(m_node.chain.get(), "", CreateMockWalletDatabase())
|
||||
{
|
||||
bool fFirstRun;
|
||||
m_wallet.LoadWallet(fFirstRun);
|
||||
m_wallet.LoadWallet();
|
||||
m_chain_notifications_handler = m_node.chain->handleNotifications({ &m_wallet, [](CWallet*) {} });
|
||||
m_wallet_client->registerRpcs();
|
||||
}
|
||||
|
||||
@@ -483,8 +483,7 @@ public:
|
||||
LOCK2(wallet->cs_wallet, ::cs_main);
|
||||
wallet->SetLastBlockProcessed(::ChainActive().Height(), ::ChainActive().Tip()->GetBlockHash());
|
||||
}
|
||||
bool firstRun;
|
||||
wallet->LoadWallet(firstRun);
|
||||
wallet->LoadWallet();
|
||||
AddKey(*wallet, coinbaseKey);
|
||||
WalletRescanReserver reserver(*wallet);
|
||||
reserver.reserve();
|
||||
|
||||
Reference in New Issue
Block a user