Browse Source

Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP before genesis

37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
0.14
Wladimir J. van der Laan 8 years ago
parent
commit
c587577356
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 7
      src/init.cpp
  2. 2
      src/wallet/wallet.cpp

7
src/init.cpp

@ -1493,6 +1493,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait); 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 // ********************************************************* Step 11: start node
//// debug print //// debug print

2
src/wallet/wallet.cpp

@ -3466,8 +3466,6 @@ bool CWallet::InitLoadWallet()
LogPrintf("mapWallet.size() = %u\n", walletInstance->mapWallet.size()); LogPrintf("mapWallet.size() = %u\n", walletInstance->mapWallet.size());
LogPrintf("mapAddressBook.size() = %u\n", walletInstance->mapAddressBook.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; pwalletMain = walletInstance;

Loading…
Cancel
Save