From 119a7e825b4c5a57bbf8a078d8b1e8b30522e44c Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Jul 2019 01:54:11 -1100 Subject: [PATCH] Make nSPV disable wallet --- src/init.cpp | 2 ++ src/main.cpp | 2 +- src/wallet/rpcwallet.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index d61426722..919a07e1d 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1064,6 +1064,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) RegisterAllCoreRPCCommands(tableRPC); #ifdef ENABLE_WALLET bool fDisableWallet = GetBoolArg("-disablewallet", false); + if ( KOMODO_NSPV != 0 ) + fDisableWallet = true; if (!fDisableWallet) RegisterWalletRPCCommands(tableRPC); #endif diff --git a/src/main.cpp b/src/main.cpp index df959bf76..e9b23d4a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4109,7 +4109,7 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) { if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block,pindexDelete->GetHeight(),true) != 0))) { #ifdef ENABLE_WALLET - if ( !GetBoolArg("-disablewallet", false) ) + if ( !GetBoolArg("-disablewallet", false) && KOMODO_NSPV == 0 ) pwalletMain->EraseFromWallet(tx.GetHash()); #endif } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ce377d094..955118346 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2955,7 +2955,7 @@ UniValue listunspent(const UniValue& params, bool fHelp) uint64_t komodo_interestsum() { #ifdef ENABLE_WALLET - if ( ASSETCHAINS_SYMBOL[0] == 0 && GetBoolArg("-disablewallet", false) == 0 ) + if ( ASSETCHAINS_SYMBOL[0] == 0 && GetBoolArg("-disablewallet", false) == 0 && KOMODO_NSPV == 0 ) { uint64_t interest,sum = 0; int32_t txheight; uint32_t locktime; vector vecOutputs;