Skip to content

Commit

Permalink
Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP befo…
Browse files Browse the repository at this point in the history
…re genesis

37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
  • Loading branch information
laanwj committed Oct 19, 2016
2 parents 475d682 + 37aefff commit c587577
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/init.cpp
Expand Up @@ -1493,6 +1493,13 @@ bool AppInit2(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 11: start node

//// debug print
Expand Down
2 changes: 0 additions & 2 deletions src/wallet/wallet.cpp
Expand Up @@ -3466,8 +3466,6 @@ bool CWallet::InitLoadWallet()
LogPrintf("mapWallet.size() = %u\n", walletInstance->mapWallet.size());
LogPrintf("mapAddressBook.size() = %u\n", walletInstance->mapAddressBook.size());
}
// Add wallet transactions that aren't already in a block to mapTransactions
walletInstance->ReacceptWalletTransactions();

pwalletMain = walletInstance;

Expand Down

0 comments on commit c587577

Please sign in to comment.