Browse Source

Remove dead code

pull/51/head
Duke Leto 5 years ago
parent
commit
b2d577c31f
  1. 2
      src/komodo_bitcoind.h
  2. 1
      src/komodo_defs.h
  3. 10
      src/main.cpp

2
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<CBitcoinAddress> setAddress; struct komodo_staking *kp; int32_t winners,segid,minage,nHeight,counter=0,i,m,siglen=0,nMinDepth = 1,nMaxDepth = 99999999; vector<COutput> 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))

1
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<uint8_t> payload);

10
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);

Loading…
Cancel
Save