Prevent relaying expired tx
This commit is contained in:
@@ -1033,16 +1033,16 @@ int32_t komodo_validate_interest(const CTransaction &tx,int32_t txheight,uint32_
|
||||
{
|
||||
if ( txheight < 247205 )
|
||||
cmptime -= 16000;
|
||||
if ( (int64_t)tx.nLockTime < cmptime-3600 )
|
||||
if ( (int64_t)tx.nLockTime < cmptime-KOMODO_MAXMEMPOOLTIME )
|
||||
{
|
||||
if ( tx.nLockTime != 1477258935 && dispflag != 0 )
|
||||
{
|
||||
fprintf(stderr,"komodo_validate_interest.%d reject.%d [%d] locktime %u cmp2.%u\n",dispflag,txheight,(int32_t)(tx.nLockTime - (cmptime-3600)),(uint32_t)tx.nLockTime,cmptime);
|
||||
fprintf(stderr,"komodo_validate_interest.%d reject.%d [%d] locktime %u cmp2.%u\n",dispflag,txheight,(int32_t)(tx.nLockTime - (cmptime-KOMODO_MAXMEMPOOLTIME)),(uint32_t)tx.nLockTime,cmptime);
|
||||
}
|
||||
return(-1);
|
||||
}
|
||||
if ( 0 && 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);
|
||||
fprintf(stderr,"validateinterest.%d accept.%d [%d] locktime %u cmp2.%u\n",dispflag,(int32_t)txheight,(int32_t)(tx.nLockTime - (cmptime-KOMODO_MAXMEMPOOLTIME)),(int32_t)tx.nLockTime,cmptime);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user