Skip to content

Commit 5ca6382

Browse files
test: correct calculation of coinbasevalue in feature_asset_locks.py (#5603)
## Issue being fixed or feature implemented Fixed a problem forgotten in #5588 in feature_asset_locks.py. ## What was done? Avoid floating operations when calculating `coinbasevalue` ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
1 parent bf84e37 commit 5ca6382

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/functional/feature_asset_locks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ def run_test(self):
513513
owner_reward = bt['masternode'][1]['amount']
514514
operator_reward = bt['masternode'][2]['amount'] if len(bt['masternode']) == 3 else 0
515515
all_mn_rewards = platform_reward + owner_reward + operator_reward
516-
all_mn_rewards += 1 * 0.75
517-
assert_equal(all_mn_rewards, bt['coinbasevalue'] * 0.75) # 75/25 mn/miner reward split
516+
assert_equal(all_mn_rewards, bt['coinbasevalue'] * 3 // 4) # 75/25 mn/miner reward split
518517
assert_equal(platform_reward, all_mn_rewards * 375 // 1000) # 0.375 platform share
519518
assert_equal(platform_reward, 2555399792)
520519
assert_equal(new_total, self.get_credit_pool_balance())

0 commit comments

Comments
 (0)