older asset chain compatible block reward of 0.0001

This commit is contained in:
Michael Toutonghi
2018-04-10 01:06:42 -07:00
parent 26a8d19484
commit 18ec2a38d2

View File

@@ -1563,9 +1563,10 @@ uint64_t komodo_ac_block_subsidy(int nHeight)
int32_t numhalvings, curEra = 0;
static uint64_t cached_subsidy; static int32_t cached_numhalvings; static int cached_era;
// if we have zero end block with rewards or non-zero end-block, check further
if ( (ASSETCHAINS_ENDSUBSIDY[0] == 0 && ASSETCHAINS_REWARD[0] != 0) || ASSETCHAINS_ENDSUBSIDY[0] != 0 )
// check for backwards compat, older chains with no rewards had 0.0001 block reward
if ( ASSETCHAINS_ENDSUBSIDY[0] == 0 && ASSETCHAINS_REWARD[0] == 0 )
nSubsidy = 10000;
else if ( (ASSETCHAINS_ENDSUBSIDY[0] == 0 && ASSETCHAINS_REWARD[0] != 0) || ASSETCHAINS_ENDSUBSIDY[0] != 0 )
{
// if we have an end block in the first era, find our current era
if ( ASSETCHAINS_ENDSUBSIDY[0] != 0 )