This commit is contained in:
jl777
2017-03-22 07:46:29 +02:00
parent 68d59d5bad
commit 3ffe93d815

View File

@@ -706,7 +706,7 @@ bool IsStandardTx(const CTransaction& tx, string& reason)
return true; return true;
} }
int32_t komodo_grandfathered(uint32_t locktime) /*int32_t komodo_grandfathered(uint32_t locktime)
{ {
static uint32_t grandfathered[] = static uint32_t grandfathered[] =
{ {
@@ -736,6 +736,7 @@ int32_t komodo_grandfathered(uint32_t locktime)
} }
#define KOMODO_GRANDFATHER_TIME (1490155211 + 3600) //(1490114274 + 3600*24) #define KOMODO_GRANDFATHER_TIME (1490155211 + 3600) //(1490114274 + 3600*24)
*/
bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime,int flags) bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime,int flags)
{ {
@@ -744,7 +745,8 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime,int
return true; return true;
if ( ASSETCHAINS_SYMBOL[0] == 0 && flags == STANDARD_LOCKTIME_VERIFY_FLAGS && (int64_t)tx.nLockTime >= LOCKTIME_THRESHOLD && (int64_t)tx.nLockTime < nBlockTime-3600 ) if ( ASSETCHAINS_SYMBOL[0] == 0 && flags == STANDARD_LOCKTIME_VERIFY_FLAGS && (int64_t)tx.nLockTime >= LOCKTIME_THRESHOLD && (int64_t)tx.nLockTime < nBlockTime-3600 )
{ {
if ( komodo_grandfathered(tx.nLockTime) < 0 )//&& nBlockTime > KOMODO_GRANDFATHER_TIME ) if ( nBlockTime > 1490159171 ) // 246748
//if ( komodo_grandfathered(tx.nLockTime) < 0 )//&& nBlockTime > KOMODO_GRANDFATHER_TIME )
{ {
fprintf(stderr,"[%d] IsFinalTx reject locktime %u vs nBlockTime %u\n",(int32_t)(tx.nLockTime-nBlockTime),tx.nLockTime,(uint32_t)nBlockTime); fprintf(stderr,"[%d] IsFinalTx reject locktime %u vs nBlockTime %u\n",(int32_t)(tx.nLockTime-nBlockTime),tx.nLockTime,(uint32_t)nBlockTime);
return(false); // need to prevent pastdating tx return(false); // need to prevent pastdating tx
@@ -905,7 +907,8 @@ int32_t komodo_validate_interest(const CTransaction& tx)
tiptime = chainActive.Tip()->nTime; tiptime = chainActive.Tip()->nTime;
if ( (int64_t)tx.nLockTime < tiptime-3600 ) if ( (int64_t)tx.nLockTime < tiptime-3600 )
{ {
if ( komodo_grandfathered(tx.nLockTime) < 0 && tiptime > KOMODO_GRANDFATHER_TIME ) if ( nBlockTime > 1490159171 ) // 246748
//if ( komodo_grandfathered(tx.nLockTime) < 0 && tiptime > KOMODO_GRANDFATHER_TIME )
{ {
fprintf(stderr,"komodo_validate_interest reject locktime %u/%u vs nBlockTime %u tiptime.%u\n",(uint32_t)tx.nLockTime,locktime,(uint32_t)chainActive.Tip()->nTime,tiptime); fprintf(stderr,"komodo_validate_interest reject locktime %u/%u vs nBlockTime %u tiptime.%u\n",(uint32_t)tx.nLockTime,locktime,(uint32_t)chainActive.Tip()->nTime,tiptime);
return(-1); return(-1);