mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-03 22:03:01 +01:00
Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet
This commit is contained in:
12
src/init.cpp
12
src/init.cpp
@@ -1438,15 +1438,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
//// debug print
|
||||
LogPrintf("mapBlockIndex.size() = %u\n", mapBlockIndex.size());
|
||||
LogPrintf("nBestHeight = %d\n", chainActive.Height());
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain) {
|
||||
LOCK(pwalletMain->cs_wallet);
|
||||
LogPrintf("setKeyPool.size() = %u\n", pwalletMain->GetKeyPoolSize());
|
||||
LogPrintf("mapWallet.size() = %u\n", pwalletMain->mapWallet.size());
|
||||
LogPrintf("mapAddressBook.size() = %u\n", pwalletMain->mapAddressBook.size());
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION))
|
||||
StartTorControl(threadGroup, scheduler);
|
||||
|
||||
@@ -1459,9 +1450,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
|
||||
#ifdef ENABLE_WALLET
|
||||
if (pwalletMain) {
|
||||
// Add wallet transactions that aren't already in a block to mapTransactions
|
||||
pwalletMain->ReacceptWalletTransactions();
|
||||
|
||||
// Run a thread to flush wallet periodically
|
||||
threadGroup.create_thread(boost::bind(&ThreadFlushWalletDB, boost::ref(pwalletMain->strWalletFile)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user