-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Including tx fee into block rewards #752
Conversation
672d779
to
e377b81
Compare
@@ -239,7 +239,7 @@ std::unique_ptr<CBlockTemplate> BlockAssembler::CreateNewBlock(const CScript& sc | |||
coinbaseTx.vout.resize(2); | |||
|
|||
// Explicitly set miner reward | |||
coinbaseTx.vout[0].nValue = CalculateCoinbaseReward(blockReward, consensus.dist.masternode); | |||
coinbaseTx.vout[0].nValue = nFees + CalculateCoinbaseReward(blockReward, consensus.dist.masternode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be covered by hardfork height
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation should still pass even without fork height.
Line 2065 in 6059de0
if (cbValues.at(DCT_ID{0}) > blockReward + nFees) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we go without hardfork, newer nodes will generate bigger reward than older one, It's inconstancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make the change in another PR based on 1.9.x.
#764
Close this in favor of #764 |
What kind of PR is this?:
/kind fix
What this PR does / why we need it:
Tx fees not included in the block rewards
Which issue(s) does this PR fixes?:
Fixes #
https://github.com/cakedefi/defichain-private/issues/681
Additional comments?: