diff --git a/src/komodo_bitcoind.h b/src/komodo_bitcoind.h index 2a5db1359..04f2c2ec1 100644 --- a/src/komodo_bitcoind.h +++ b/src/komodo_bitcoind.h @@ -2325,7 +2325,7 @@ struct komodo_staking *komodo_addutxo(struct komodo_staking *array,int32_t *numk int32_t komodo_staked(CMutableTransaction &txNew,uint32_t nBits,uint32_t *blocktimep,uint32_t *txtimep,uint256 *utxotxidp,int32_t *utxovoutp,uint64_t *utxovaluep,uint8_t *utxosig, uint256 merkleroot) { static struct komodo_staking *array; static int32_t numkp,maxkp; static uint32_t lasttime; - int32_t PoSperc = 0, newStakerActive; + int32_t PoSperc = 0; set setAddress; struct komodo_staking *kp; int32_t winners,segid,minage,nHeight,counter=0,i,m,siglen=0,nMinDepth = 1,nMaxDepth = 99999999; vector vecOutputs; uint32_t block_from_future_rejecttime,besttime,eligible,earliest = 0; CScript best_scriptPubKey; arith_uint256 mindiff,ratio,bnTarget,tmpTarget; CBlockIndex *tipindex,*pindex; CTxDestination address; bool fNegative,fOverflow; uint8_t hashbuf[256]; CTransaction tx; uint256 hashBlock; uint64_t cbPerc = *utxovaluep, tocoinbase = 0; if (!EnsureWalletIsAvailable(0)) diff --git a/src/komodo_defs.h b/src/komodo_defs.h index ca098f4ab..68ea442b9 100644 --- a/src/komodo_defs.h +++ b/src/komodo_defs.h @@ -420,7 +420,6 @@ int32_t komodo_currentheight(); int32_t komodo_notarized_bracket(struct notarized_checkpoint *nps[2],int32_t height); arith_uint256 komodo_adaptivepow_target(int32_t height,arith_uint256 bnTarget,uint32_t nTime); bool hush_hardfork_active(uint32_t time); -int32_t komodo_newStakerActive(int32_t height, uint32_t timestamp); uint256 Parseuint256(const char *hexstr); void komodo_sendmessage(int32_t minpeers, int32_t maxpeers, const char *message, std::vector payload); diff --git a/src/main.cpp b/src/main.cpp index f2c5c0c69..46d50fe40 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -4089,15 +4089,7 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) { for (int i = 0; i < block.vtx.size(); i++) { CTransaction &tx = block.vtx[i]; - //if ((i == (block.vtx.size() - 1)) && ((ASSETCHAINS_LWMAPOS && block.IsVerusPOSBlock()) || (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block) != 0)))) - if (0) // komodo_newStakerActive(0, pindexDelete->nTime) == 0 && i == block.vtx.size()-1 && komodo_isPoS((CBlock *)&block,pindexDelete->GetHeight(),0) != 0 ) - { -#ifdef ENABLE_WALLET - // new staking tx cannot be accepted to mempool and expires in 1 block, so no need for this! :D - if ( !GetBoolArg("-disablewallet", false) && KOMODO_NSPV_FULLNODE ) - pwalletMain->EraseFromWallet(tx.GetHash()); -#endif - } else SyncWithWallets(tx, NULL); + SyncWithWallets(tx, NULL); } // Update cached incremental witnesses GetMainSignals().ChainTip(pindexDelete, &block, newSproutTree, newSaplingTree, false);