CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
...
// Force block reward to zero when right shift is undefined.
if (halvings >= xxx) --------------Sample
return 0;
...
}
That should be the following regardless of any of the parameters:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
...
// Force block reward to zero when right shift is undefined.
if (halvings >= sizeof(nSubsidy) * CHAR_BIT)
return 0;
...
}
In Bitcoin Core, they use the literal 64, which is ok until something changes and then it becomes a bug.
Thanks for replay.