Make nSPV disable wallet

This commit is contained in:
jl777
2019-07-02 01:54:11 -11:00
parent efec2490c8
commit 119a7e825b
3 changed files with 4 additions and 2 deletions

View File

@@ -1064,6 +1064,8 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
RegisterAllCoreRPCCommands(tableRPC); RegisterAllCoreRPCCommands(tableRPC);
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
bool fDisableWallet = GetBoolArg("-disablewallet", false); bool fDisableWallet = GetBoolArg("-disablewallet", false);
if ( KOMODO_NSPV != 0 )
fDisableWallet = true;
if (!fDisableWallet) if (!fDisableWallet)
RegisterWalletRPCCommands(tableRPC); RegisterWalletRPCCommands(tableRPC);
#endif #endif

View File

@@ -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))) if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block,pindexDelete->GetHeight(),true) != 0)))
{ {
#ifdef ENABLE_WALLET #ifdef ENABLE_WALLET
if ( !GetBoolArg("-disablewallet", false) ) if ( !GetBoolArg("-disablewallet", false) && KOMODO_NSPV == 0 )
pwalletMain->EraseFromWallet(tx.GetHash()); pwalletMain->EraseFromWallet(tx.GetHash());
#endif #endif
} }

View File

@@ -2955,7 +2955,7 @@ UniValue listunspent(const UniValue& params, bool fHelp)
uint64_t komodo_interestsum() uint64_t komodo_interestsum()
{ {
#ifdef ENABLE_WALLET #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; uint64_t interest,sum = 0; int32_t txheight; uint32_t locktime;
vector<COutput> vecOutputs; vector<COutput> vecOutputs;