aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-10-19 18:10:52 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-10-19 18:11:15 +0200
commitc5875773561c249a079714f3b091a2577707eadf (patch)
tree9aa1f86d86767beeea12bf1ab5b1136e9f6f60f1 /src
parent475d68252e9c469393da92e4cd0e6caa428b4364 (diff)
parent37aefff5fcf7169a1b07ff8939850f630640f7e7 (diff)
Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP before genesis
37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
Diffstat (limited to 'src')
-rw-r--r--src/init.cpp7
-rw-r--r--src/wallet/wallet.cpp2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/init.cpp b/src/init.cpp
index 2b1fbed072..d3efc9f978 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -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
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 282917d64f..c7f98b238e 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -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;