fix off-by-1 in CSuperblock::GetPaymentsLimit (#1598)
This commit is contained in:
parent
82595b1b91
commit
6496fc9dad
@ -535,7 +535,7 @@ CAmount CSuperblock::GetPaymentsLimit(int nBlockHeight)
|
||||
// min subsidy for high diff networks and vice versa
|
||||
int nBits = consensusParams.fPowAllowMinDifficultyBlocks ? UintToArith256(consensusParams.powLimit).GetCompact() : 1;
|
||||
// some part of all blocks issued during the cycle goes to superblock, see GetBlockSubsidy
|
||||
CAmount nSuperblockPartOfSubsidy = GetBlockSubsidy(nBits, nBlockHeight, consensusParams, true);
|
||||
CAmount nSuperblockPartOfSubsidy = GetBlockSubsidy(nBits, nBlockHeight - 1, consensusParams, true);
|
||||
CAmount nPaymentsLimit = nSuperblockPartOfSubsidy * consensusParams.nSuperblockCycle;
|
||||
LogPrint("gobject", "CSuperblock::GetPaymentsLimit -- Valid superblock height %d, payments max %lld\n", nBlockHeight, nPaymentsLimit);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user