mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Fix GetPaymentsLimit()
This commit is contained in:
parent
51434cfff5
commit
aa74200d5a
@ -525,9 +525,9 @@ CAmount CSuperblock::GetPaymentsLimit(int nBlockHeight)
|
|||||||
|
|
||||||
// min subsidy for high diff networks and vice versa
|
// min subsidy for high diff networks and vice versa
|
||||||
int nBits = consensusParams.fPowAllowMinDifficultyBlocks ? UintToArith256(consensusParams.powLimit).GetCompact() : 1;
|
int nBits = consensusParams.fPowAllowMinDifficultyBlocks ? UintToArith256(consensusParams.powLimit).GetCompact() : 1;
|
||||||
CAmount nBlockSubsidy = GetBlockSubsidy(nBits, nBlockHeight, consensusParams);
|
// some part of all blocks issued during the cycle goes to superblock, see GetBlockSubsidy
|
||||||
// 10% of all blocks issued during the cycle goes to superblock
|
CAmount nSuperblockPartOfSubsidy = GetBlockSubsidy(nBits, nBlockHeight, consensusParams, true);
|
||||||
CAmount nPaymentsLimit = nBlockSubsidy * consensusParams.nSuperblockCycle / 10;
|
CAmount nPaymentsLimit = nSuperblockPartOfSubsidy * consensusParams.nSuperblockCycle;
|
||||||
LogPrint("gobject", "CSuperblock::GetPaymentsLimit -- Valid superblock height %d, payments max %lld\n", nBlockHeight, nPaymentsLimit);
|
LogPrint("gobject", "CSuperblock::GetPaymentsLimit -- Valid superblock height %d, payments max %lld\n", nBlockHeight, nPaymentsLimit);
|
||||||
|
|
||||||
return nPaymentsLimit;
|
return nPaymentsLimit;
|
||||||
|
Loading…
Reference in New Issue
Block a user