Skip to content

Commit 0bd25cd

Browse files
jamescowensclaude
andcommitted
refactor: use Allocation class for MRC foundation fee computation (gridcoin-community#2880)
Replace manual GetNumerator()/GetDenominator() arithmetic with Allocation * CAmount pattern, matching the idiom used elsewhere. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 32901b2 commit 0bd25cd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/gridcoin/consensus/block_rewards.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,8 +615,7 @@ bool BlockRewardRules::CheckMRCRewards(
615615
mrc_rewards += mrc_reward;
616616
mrc_fees += mrc.m_fee;
617617
mrc_staker_fees += mrc.m_fee
618-
- mrc.m_fee * foundation_fee_fraction.GetNumerator()
619-
/ foundation_fee_fraction.GetDenominator();
618+
- (static_cast<Allocation>(foundation_fee_fraction) * mrc.m_fee).ToCAmount();
620619

621620
++mrc_outputs;
622621
} // beacon

0 commit comments

Comments
 (0)