Test
This commit is contained in:
@@ -805,7 +805,7 @@ int32_t komodo_isrealtime(int32_t *kmdheightp)
|
||||
else return(0);
|
||||
}
|
||||
|
||||
int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_t nTime)
|
||||
int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_t nTime,int32_t dispflag)
|
||||
{
|
||||
uint32_t cmptime = nTime;
|
||||
if ( KOMODO_REWIND == 0 && ASSETCHAINS_SYMBOL[0] == 0 && (int64_t)tx.nLockTime >= LOCKTIME_THRESHOLD ) //1473793441 )
|
||||
@@ -822,7 +822,8 @@ int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
fprintf(stderr,"validateinterest accept.%d [%d] locktime %u cmp2.%u\n",(int32_t)txheight,(int32_t)(tx.nLockTime - (cmptime-3600)),(int32_t)tx.nLockTime,cmptime);
|
||||
if ( dispflag != 0 )
|
||||
fprintf(stderr,"validateinterest.%d accept.%d [%d] locktime %u cmp2.%u\n",dispflag,(int32_t)txheight,(int32_t)(tx.nLockTime - (cmptime-3600)),(int32_t)tx.nLockTime,cmptime);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -1111,7 +1111,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
if (pfMissingInputs)
|
||||
*pfMissingInputs = false;
|
||||
auto verifier = libzcash::ProofVerifier::Strict();
|
||||
if ( komodo_validate_interest(tx,chainActive.Tip()->nHeight+1,chainActive.Tip()->GetMedianTimePast() + 777) < 0 )
|
||||
if ( komodo_validate_interest(tx,chainActive.Tip()->nHeight+1,chainActive.Tip()->GetMedianTimePast() + 777,3) < 0 )
|
||||
{
|
||||
fprintf(stderr,"AcceptToMemoryPool komodo_validate_interest failure\n");
|
||||
return error("AcceptToMemoryPool: komodo_validate_interest failed");
|
||||
@@ -3227,7 +3227,7 @@ bool CheckBlock(int32_t height,CBlockIndex *pindex,const CBlock& block, CValidat
|
||||
// Check transactions
|
||||
BOOST_FOREACH(const CTransaction& tx, block.vtx)
|
||||
{
|
||||
if ( komodo_validate_interest(tx,komodo_block2height((CBlock *)&block),block.nTime) < 0 )
|
||||
if ( komodo_validate_interest(tx,komodo_block2height((CBlock *)&block),block.nTime,1) < 0 )
|
||||
return error("CheckBlock: komodo_validate_interest failed");
|
||||
if (!CheckTransaction(tx, state, verifier))
|
||||
return error("CheckBlock(): CheckTransaction failed");
|
||||
|
||||
@@ -114,7 +114,7 @@ int32_t komodo_baseid(char *origbase);
|
||||
int32_t komodo_is_issuer();
|
||||
int32_t komodo_gateway_deposits(CMutableTransaction *txNew,char *symbol,int32_t tokomodo);
|
||||
int32_t komodo_isrealtime(int32_t *kmdheightp);
|
||||
int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_t nTime);
|
||||
int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_t nTime,int32_t dispflag);
|
||||
|
||||
CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
{
|
||||
@@ -205,7 +205,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
|
||||
|
||||
if (tx.IsCoinBase() || !IsFinalTx(tx, nHeight, nLockTimeCutoff))
|
||||
continue;
|
||||
if ( 0 && komodo_validate_interest(tx,nHeight,(uint32_t)pblock->nTime) < 0 )
|
||||
if ( 0 && komodo_validate_interest(tx,nHeight,(uint32_t)pblock->nTime,2) < 0 )
|
||||
{
|
||||
fprintf(stderr,"CreateNewBlock: komodo_validate_interest failure\n");
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user