From 18ec2a38d25cfc729644bb24e2a8f3c16bfb6fcf Mon Sep 17 00:00:00 2001 From: Michael Toutonghi Date: Tue, 10 Apr 2018 01:06:42 -0700 Subject: [PATCH] older asset chain compatible block reward of 0.0001 --- src/komodo_utils.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index ff90d7307..640449da9 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -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 )