Rename time lock parameters and globals
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user