Add test for ECIP1017 at block 250000000

This commit is contained in:
Wei Tang 2017-11-24 19:31:48 +08:00 committed by GitHub
parent b35cc3f716
commit bef85fb876
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -520,6 +520,12 @@ mod tests {
let (eras, reward) = ecip1017_eras_block_reward(eras_rounds, start_reward, block_number); let (eras, reward) = ecip1017_eras_block_reward(eras_rounds, start_reward, block_number);
assert_eq!(15, eras); assert_eq!(15, eras);
assert_eq!(U256::from_str("271000000000000").unwrap(), reward); assert_eq!(U256::from_str("271000000000000").unwrap(), reward);
let block_number = 250000000;
let (eras, reward) = ecip1017_eras_block_reward(eras_rounds, start_reward, block_number);
assert_eq!(48, eras);
assert!(U256::from_str("65697BFA9ACB").unwrap() != reward);
assert_eq!(U256::from_str("65697BFA9ACD").unwrap(), reward);
} }
#[test] #[test]