Skip to content

Commit c587577

Browse files
committed
Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP before genesis
37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
2 parents 475d682 + 37aefff commit c587577

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/init.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,13 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
14931493
uiInterface.NotifyBlockTip.disconnect(BlockNotifyGenesisWait);
14941494
}
14951495

1496+
#ifdef ENABLE_WALLET
1497+
// Add wallet transactions that aren't already in a block to mempool
1498+
// Do this here as mempool requires genesis block to be loaded
1499+
if (pwalletMain)
1500+
pwalletMain->ReacceptWalletTransactions();
1501+
#endif
1502+
14961503
// ********************************************************* Step 11: start node
14971504

14981505
//// debug print

src/wallet/wallet.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,8 +3466,6 @@ bool CWallet::InitLoadWallet()
34663466
LogPrintf("mapWallet.size() = %u\n", walletInstance->mapWallet.size());
34673467
LogPrintf("mapAddressBook.size() = %u\n", walletInstance->mapAddressBook.size());
34683468
}
3469-
// Add wallet transactions that aren't already in a block to mapTransactions
3470-
walletInstance->ReacceptWalletTransactions();
34713469

34723470
pwalletMain = walletInstance;
34733471

0 commit comments

Comments
 (0)