Fix calculation of block 1 reward for ASSETCHAINS_STAKED chains

This commit is contained in:
miketout
2018-11-20 00:04:47 -08:00
parent 070bccada0
commit 09ae2558a0

View File

@@ -1636,11 +1636,13 @@ uint64_t komodo_ac_block_subsidy(int nHeight)
} }
} }
if ( nHeight == 1 ) if ( nHeight == 1 )
{
uint32_t magicExtra = ASSETCHAINS_STAKED ? ASSETCHAINS_MAGIC : (ASSETCHAINS_MAGIC & 0xffffff);
if ( ASSETCHAINS_LASTERA == 0 ) if ( ASSETCHAINS_LASTERA == 0 )
subsidy = ASSETCHAINS_SUPPLY * SATOSHIDEN + (ASSETCHAINS_MAGIC & 0xffffff); subsidy = ASSETCHAINS_SUPPLY * SATOSHIDEN + magicExtra;
else else
subsidy += ASSETCHAINS_SUPPLY * SATOSHIDEN + (ASSETCHAINS_MAGIC & 0xffffff); subsidy += ASSETCHAINS_SUPPLY * SATOSHIDEN + magicExtra;
}
return(subsidy); return(subsidy);
} }