[Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)

This commit is contained in:
Jonas Schnelli
2016-10-20 09:22:13 +02:00
parent c587577356
commit cab1da745b
3 changed files with 19 additions and 11 deletions

View File

@@ -3472,6 +3472,16 @@ bool CWallet::InitLoadWallet()
return true;
}
void CWallet::postInitProcess(boost::thread_group& threadGroup)
{
// Add wallet transactions that aren't already in a block to mempool
// Do this here as mempool requires genesis block to be loaded
ReacceptWalletTransactions();
// Run a thread to flush wallet periodically
threadGroup.create_thread(boost::bind(&ThreadFlushWalletDB, boost::ref(this->strWalletFile)));
}
bool CWallet::ParameterInteraction()
{
if (GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET))