get rid of magic 2299859813 in feature_asset_locks.py

This commit is contained in:
UdjinM6 2023-09-01 14:53:12 +03:00 committed by PastaPastaPasta
parent c5d11a241b
commit be7dcd4281

View File

@ -498,16 +498,24 @@ class AssetLocksTest(DashTestFramework):
self.activate_mn_rr(expected_activation_height=3090) self.activate_mn_rr(expected_activation_height=3090)
self.log.info(f'height: {node.getblockcount()} credit: {self.get_credit_pool_balance()}') self.log.info(f'height: {node.getblockcount()} credit: {self.get_credit_pool_balance()}')
reward = 2299859813 bt = node.getblocktemplate()
platform_reward = bt['masternode'][0]['amount']
assert_equal(bt['masternode'][0]['script'], '6a') # empty OP_RETURN
owner_reward = bt['masternode'][1]['amount']
operator_reward = bt['masternode'][2]['amount'] if len(bt['masternode']) == 3 else 0
all_mn_rewards = platform_reward + owner_reward + operator_reward
assert_equal(all_mn_rewards, bt['coinbasevalue'] * 0.6) # 60/40 mn/miner reward split
assert_equal(platform_reward, int(all_mn_rewards * 0.375)) # 0.375 platform share
assert_equal(platform_reward, 2299859813)
assert_equal(new_total, self.get_credit_pool_balance()) assert_equal(new_total, self.get_credit_pool_balance())
node.generate(1) node.generate(1)
self.sync_all() self.sync_all()
new_total += reward new_total += platform_reward
assert_equal(new_total, self.get_credit_pool_balance()) assert_equal(new_total, self.get_credit_pool_balance())
coin = coins.pop() coin = coins.pop()
self.send_tx(self.create_assetlock(coin, COIN, pubkey)) self.send_tx(self.create_assetlock(coin, COIN, pubkey))
new_total += reward + COIN new_total += platform_reward + COIN
node.generate(1) node.generate(1)
self.sync_all() self.sync_all()
# part of fee is going to master node reward # part of fee is going to master node reward