diff --git a/crates/ethcore/src/engines/unity/mod.rs b/crates/ethcore/src/engines/unity/mod.rs index ce3acc89ce..b4baacec55 100644 --- a/crates/ethcore/src/engines/unity/mod.rs +++ b/crates/ethcore/src/engines/unity/mod.rs @@ -753,7 +753,7 @@ impl Unity { machine: EthereumMachine, optimize_for: T, ) -> Result, Error> { - debug!("unity params: {:?}, {:?}, {:?}, {:?}, {:?}, {:?}", + debug!("unity params: {:?}, {:?}, {:?}, {:?}, {:?}", our_params.minimum_difficulty, our_params.block_reward, our_params.two_thirds_majority_transition, @@ -2207,7 +2207,6 @@ mod tests { durations: [StepDurationInfo { transition_step: 0, transition_timestamp: 0, - step_duration: 1, }] .to_vec() .into_iter() @@ -2368,7 +2367,6 @@ mod tests { fn should_collect_block_reward_transitions() { let config = r#"{ "params": { - "stepDuration": "5", "validators": { "list" : ["0x1000000000000000000000000000000000000001"] }, @@ -2419,7 +2417,6 @@ mod tests { fn should_reject_out_of_order_block_reward_transition() { let config = r#"{ "params": { - "stepDuration": "5", "validators": { "list" : ["0x1000000000000000000000000000000000000001"] }, diff --git a/crates/ethcore/src/spec/spec.rs b/crates/ethcore/src/spec/spec.rs index 41d120f18b..8e2c3639c8 100644 --- a/crates/ethcore/src/spec/spec.rs +++ b/crates/ethcore/src/spec/spec.rs @@ -727,7 +727,12 @@ impl Spec { .expect("Failed to start AuthorityRound consensus engine.") }, ethjson::spec::Engine::Unity(unity) => { - Unity::new(unity.params.into(), machine) + Unity::new( + spec_params.cache_dir, + unity.params.into(), + machine, + spec_params.optimization_setting, + ) .expect("Failed to start Unity consensus engine.") } }; diff --git a/crates/ethjson/src/spec/unity.rs b/crates/ethjson/src/spec/unity.rs index 1e684f1912..770b4a52a6 100644 --- a/crates/ethjson/src/spec/unity.rs +++ b/crates/ethjson/src/spec/unity.rs @@ -23,7 +23,6 @@ //! //! ```ignore //! "params": { -//! "stepDuration": "5", //! "validators": { //! "multi": { //! "0": { @@ -113,7 +112,7 @@ mod tests { use crate::{ hash::Address, spec::{ - unity::Unity, step_duration::StepDuration, + unity::Unity, validator_set::ValidatorSet, }, uint::Uint, @@ -126,7 +125,6 @@ mod tests { fn authority_round_deserialization() { let s = r#"{ "params": { - "stepDuration": "0x02", "validators": { "list" : ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"] }, @@ -146,10 +144,6 @@ mod tests { }"#; let deserialized: Unity = serde_json::from_str(s).unwrap(); - assert_eq!( - deserialized.params.step_duration, - StepDuration::Single(Uint(U256::from(2))) - ); assert_eq!( deserialized.params.validators, ValidatorSet::List(vec![Address( @@ -200,7 +194,6 @@ mod tests { fn authority_round_deserialization_multi_block() { let s = r#"{ "params": { - "stepDuration": "0x02", "validators": { "contract" : "0xc6d9d2cd449a754c494264e1809c50e34d64562b" }, @@ -212,10 +205,6 @@ mod tests { }"#; let deserialized: Unity = serde_json::from_str(s).unwrap(); - assert_eq!( - deserialized.params.step_duration, - StepDuration::Single(Uint(U256::from(0x02))) - ); assert_eq!( deserialized.params.validators, ValidatorSet::Contract(Address(