Browse Source

Make nSPV disable wallet

warmup
jl777 5 years ago
parent
commit
119a7e825b
  1. 2
      src/init.cpp
  2. 2
      src/main.cpp
  3. 2
      src/wallet/rpcwallet.cpp

2
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

2
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
}

2
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<COutput> vecOutputs;

Loading…
Cancel
Save