Rename time lock parameters and globals

This commit is contained in:
Michael Toutonghi
2018-04-15 00:43:57 -07:00
parent d26b557b73
commit 7daf656729
3 changed files with 11 additions and 11 deletions

View File

@@ -58,9 +58,9 @@ uint64_t ASSETCHAINS_SUPPLY = 10;
uint64_t ASSETCHAINS_COMMISSION;
#define _ASSETCHAINS_TIMELOCKOFF 0x7fffffffffffffffLL
int64_t ASSETCHAINS_TIMELOCKABOVE = _ASSETCHAINS_TIMELOCKOFF;
uint64_t ASSETCHAINS_TIMELOCKFROM = 0;
uint64_t ASSETCHAINS_TIMELOCKTO = 0;
int64_t ASSETCHAINS_TIMELOCKGTE = _ASSETCHAINS_TIMELOCKOFF;
uint64_t ASSETCHAINS_TIMEUNLOCKFROM = 0;
uint64_t ASSETCHAINS_TIMEUNLOCKTO = 0;
uint32_t ASSETCHAINS_ERAS = 1;
uint64_t ASSETCHAINS_ENDSUBSIDY[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_REWARD[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_HALVING[ASSETCHAINS_MAX_ERAS],ASSETCHAINS_DECAY[ASSETCHAINS_MAX_ERAS];

View File

@@ -1758,9 +1758,9 @@ void komodo_args(char *argv0)
}
ASSETCHAINS_ERAS -= 1;
ASSETCHAINS_TIMELOCKABOVE = GetArg("-ac_timelockabove", _ASSETCHAINS_TIMELOCKOFF);
ASSETCHAINS_TIMELOCKFROM = GetArg("-ac_timelockfrom", 0);
ASSETCHAINS_TIMELOCKTO = GetArg("-ac_timelockto", 0);
ASSETCHAINS_TIMELOCKGTE = GetArg("-ac_timelockgte", _ASSETCHAINS_TIMELOCKOFF);
ASSETCHAINS_TIMEUNLOCKFROM = GetArg("-ac_timeunlockfrom", 0);
ASSETCHAINS_TIMEUNLOCKTO = GetArg("-ac_timeunlockto", 0);
Split(GetArg("-ac_end",""), ASSETCHAINS_ENDSUBSIDY, 0);
Split(GetArg("-ac_reward",""), ASSETCHAINS_REWARD, 0);
@@ -1823,11 +1823,11 @@ void komodo_args(char *argv0)
// hash in lock above for time locked coinbase transactions above a certain reward value only if the lock above
// param was specified, otherwise, for compatibility, do nothing
if ( ASSETCHAINS_TIMELOCKABOVE != _ASSETCHAINS_TIMELOCKOFF )
if ( ASSETCHAINS_TIMELOCKGTE != _ASSETCHAINS_TIMELOCKOFF )
{
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMELOCKABOVE),(void *)&ASSETCHAINS_TIMELOCKABOVE);
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMELOCKFROM),(void *)&ASSETCHAINS_TIMELOCKFROM);
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMELOCKTO),(void *)&ASSETCHAINS_TIMELOCKTO);
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMELOCKGTE),(void *)&ASSETCHAINS_TIMELOCKGTE);
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMEUNLOCKFROM),(void *)&ASSETCHAINS_TIMEUNLOCKFROM);
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_TIMEUNLOCKTO),(void *)&ASSETCHAINS_TIMEUNLOCKTO);
}
extralen += iguana_rwnum(1,&extraptr[extralen],sizeof(ASSETCHAINS_COMMISSION),(void *)&ASSETCHAINS_COMMISSION);

View File

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