ECIP-1039: Monetary policy rounding specification
Fix potential rounding errors between geth and parity in the long-term future.
This commit is contained in:
parent
605cd5cd9f
commit
2ca57d7cdb
@ -450,7 +450,10 @@ fn ecip1017_eras_block_reward(era_rounds: u64, mut reward: U256, block_number:u6
|
|||||||
block_number / era_rounds
|
block_number / era_rounds
|
||||||
};
|
};
|
||||||
for _ in 0..eras {
|
for _ in 0..eras {
|
||||||
reward = reward / U256::from(5) * U256::from(4);
|
reward = reward * U256::from(4);
|
||||||
|
}
|
||||||
|
for _ in 0..eras {
|
||||||
|
reward = reward / U256::from(5);
|
||||||
}
|
}
|
||||||
(eras, reward)
|
(eras, reward)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user