diff --git a/src/masternode/payments.cpp b/src/masternode/payments.cpp index bbf39c01c21c2..bfd80dc1e30b7 100644 --- a/src/masternode/payments.cpp +++ b/src/masternode/payments.cpp @@ -344,10 +344,9 @@ void FillBlockPayments(const CSporkManager& sporkManager, CGovernanceManager& go CAmount PlatformShare(const CAmount reward) { - constexpr double platformShare = 0.375; - const CAmount platformReward = reward * platformShare; - assert(MoneyRange(platformReward)); - + const CAmount platformReward = reward * 375 / 1000; + bool ok = MoneyRange(platformReward); + assert(ok); return platformReward; } diff --git a/test/functional/feature_asset_locks.py b/test/functional/feature_asset_locks.py index 4670e339b5d4e..e5f5147dcda48 100755 --- a/test/functional/feature_asset_locks.py +++ b/test/functional/feature_asset_locks.py @@ -515,7 +515,7 @@ def run_test(self): all_mn_rewards = platform_reward + owner_reward + operator_reward all_mn_rewards += 1 * 0.75 assert_equal(all_mn_rewards, bt['coinbasevalue'] * 0.75) # 75/25 mn/miner reward split - assert_equal(platform_reward, int(all_mn_rewards * 0.375)) # 0.375 platform share + assert_equal(platform_reward, int(all_mn_rewards * 375 // 1000)) # 0.375 platform share assert_equal(platform_reward, 2555399792) assert_equal(new_total, self.get_credit_pool_balance()) node.generate(1)