From f987b079a93f6c732a76ce1907e53f3c87ebce6e Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sat, 9 Jun 2018 17:07:28 +0000 Subject: [PATCH] Avoid coredumps by initializing vpwallets on wallet loading --- src/init.cpp | 3 +++ src/komodo_validation011.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index faf71dbc4..9b02d2668 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1583,6 +1583,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) strErrors << _("Error loading wallet.dat") << "\n"; } + // Wallet has been successfully loaded + vpwallets.push_back(pwalletMain); + if (GetBoolArg("-upgradewallet", fFirstRun)) { int nMaxVersion = GetArg("-upgradewallet", 0); diff --git a/src/komodo_validation011.h b/src/komodo_validation011.h index 8117f02ac..6b7c86394 100644 --- a/src/komodo_validation011.h +++ b/src/komodo_validation011.h @@ -1169,7 +1169,7 @@ void komodo_connectblock(CBlockIndex *pindex,CBlock& block) static int32_t hwmheight; uint64_t signedmask; uint8_t scriptbuf[4096],pubkeys[64][33],scriptPubKey[35]; uint256 zero; int32_t i,j,k,numnotaries,notarized,scriptlen,numvalid,specialtx,notarizedheight,len,numvouts,numvins,height,txn_count; - if ( KOMODO_NEEDPUBKEYS != 0 ) + if ( KOMODO_NEEDPUBKEYS >= 0 ) { komodo_importpubkeys(); KOMODO_NEEDPUBKEYS = 0;