diff --git a/src/miner.cpp b/src/miner.cpp index 08fac7e22..35eb8e4d3 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -475,8 +475,8 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn,int32_t gpucount) if ( ASSETCHAINS_SYMBOL[0] == 0 && NOTARY_PUBKEY33[0] != 0 ) { CMutableTransaction txNotary = CreateNewContextualCMutableTransaction(Params().GetConsensus(), chainActive.Height() + 1); - if ( pblock->nTime < pindexPrev->nTime+65 ) - pblock->nTime = pindexPrev->nTime + 65; + if ( pblock->nTime < pindexPrev->nTime+60 ) + pblock->nTime = pindexPrev->nTime + 60; if ( gpucount < 33 ) pblock->nTime += (rand() % (33 - gpucount)*(33 - gpucount)); if ( komodo_notaryvin(txNotary,NOTARY_PUBKEY33) > 0 ) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 65dd0e22b..7187b8fe8 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2697,32 +2697,34 @@ UniValue listunspent(const UniValue& params, bool fHelp) uint64_t komodo_interestsum() { #ifdef ENABLE_WALLET - uint64_t interest,sum = 0; int32_t txheight; uint32_t locktime; - vector vecOutputs; - assert(pwalletMain != NULL); - LOCK2(cs_main, pwalletMain->cs_wallet); - pwalletMain->AvailableCoins(vecOutputs, false, NULL, true); - BOOST_FOREACH(const COutput& out,vecOutputs) + if ( GetBoolArg("-disablewallet", false) == 0 ) { - CAmount nValue = out.tx->vout[out.i].nValue; - if ( out.tx->nLockTime != 0 && out.fSpendable != 0 ) + uint64_t interest,sum = 0; int32_t txheight; uint32_t locktime; + vector vecOutputs; + assert(pwalletMain != NULL); + LOCK2(cs_main, pwalletMain->cs_wallet); + pwalletMain->AvailableCoins(vecOutputs, false, NULL, true); + BOOST_FOREACH(const COutput& out,vecOutputs) { - BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); - CBlockIndex *tipindex,*pindex = it->second; - if ( pindex != 0 && (tipindex= chainActive.Tip()) != 0 ) + CAmount nValue = out.tx->vout[out.i].nValue; + if ( out.tx->nLockTime != 0 && out.fSpendable != 0 ) { - interest = komodo_accrued_interest(&txheight,&locktime,out.tx->GetHash(),out.i,0,nValue,(int32_t)tipindex->nHeight); - //interest = komodo_interest(pindex->nHeight,nValue,out.tx->nLockTime,tipindex->nTime); - sum += interest; + BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); + CBlockIndex *tipindex,*pindex = it->second; + if ( pindex != 0 && (tipindex= chainActive.Tip()) != 0 ) + { + interest = komodo_accrued_interest(&txheight,&locktime,out.tx->GetHash(),out.i,0,nValue,(int32_t)tipindex->nHeight); + //interest = komodo_interest(pindex->nHeight,nValue,out.tx->nLockTime,tipindex->nTime); + sum += interest; + } } } + KOMODO_INTERESTSUM = sum; + KOMODO_WALLETBALANCE = pwalletMain->GetBalance(); + return(sum); } - KOMODO_INTERESTSUM = sum; - KOMODO_WALLETBALANCE = pwalletMain->GetBalance(); - return(sum); -#else - return(0); #endif + return(0); } UniValue fundrawtransaction(const UniValue& params, bool fHelp)