Make ASSETCHAINS_TIMELOCKABOVE signed to be greater than negative numbers

This commit is contained in:
Michael Toutonghi
2018-04-15 00:18:14 -07:00
parent d121e75b0b
commit d26b557b73
2 changed files with 3 additions and 3 deletions

View File

@@ -57,8 +57,8 @@ uint32_t ASSETCHAINS_MAGIC = 2387029918;
uint64_t ASSETCHAINS_SUPPLY = 10; uint64_t ASSETCHAINS_SUPPLY = 10;
uint64_t ASSETCHAINS_COMMISSION; uint64_t ASSETCHAINS_COMMISSION;
#define _ASSETCHAINS_TIMELOCKOFF 0xffffffffffffffffLL #define _ASSETCHAINS_TIMELOCKOFF 0x7fffffffffffffffLL
uint64_t ASSETCHAINS_TIMELOCKABOVE = _ASSETCHAINS_TIMELOCKOFF; int64_t ASSETCHAINS_TIMELOCKABOVE = _ASSETCHAINS_TIMELOCKOFF;
uint64_t ASSETCHAINS_TIMELOCKFROM = 0; uint64_t ASSETCHAINS_TIMELOCKFROM = 0;
uint64_t ASSETCHAINS_TIMELOCKTO = 0; uint64_t ASSETCHAINS_TIMELOCKTO = 0;

View File

@@ -964,7 +964,7 @@ bool ContextualCheckTransaction(const CTransaction& tx, CValidationState &state,
} }
} }
if (tx.IsCoinBase() && tx.vout[0].value >= ASSETCHAINS_TIMELOCKABOVE) if (tx.IsCoinBase() && tx.vout[0].nValue >= ASSETCHAINS_TIMELOCKABOVE)
{ {
// if time locks are on, ensure that this coin base is time locked exactly as it should be // if time locks are on, ensure that this coin base is time locked exactly as it should be