Skip to content

Commit

Permalink
[Wallet] Refactor wallet/init interaction
Browse files Browse the repository at this point in the history
cab1da7 [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
  • Loading branch information
CryptoCentric committed Feb 26, 2019
1 parent cdb8a90 commit 0b5e4f5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,12 +1682,6 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
}

#ifdef ENABLE_WALLET
// Add wallet transactions that aren't already in a block to mempool
// Do this here as mempool requires genesis block to be loaded
if (pwalletMain)
pwalletMain->ReacceptWalletTransactions();
#endif
// ********************************************************* Step 11a: setup PrivateSend
fMasterNode = GetBoolArg("-masternode", false);
// TODO: masternode should have no wallet
Expand Down Expand Up @@ -1859,10 +1853,8 @@ bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler)
uiInterface.InitMessage(_("Done loading"));

#ifdef ENABLE_WALLET
if (pwalletMain) {
// Run a thread to flush wallet periodically
threadGroup.create_thread(boost::bind(&ThreadFlushWalletDB, boost::ref(pwalletMain->strWalletFile)));
}
if (pwalletMain)
pwalletMain->postInitProcess(threadGroup);
#endif

threadGroup.create_thread(boost::bind(&ThreadSendAlert, boost::ref(connman)));
Expand Down

0 comments on commit 0b5e4f5

Please sign in to comment.