From c4892cefbe0ed9c760a89a516e208d3fd73bef6f Mon Sep 17 00:00:00 2001 From: Artem Vorotnikov Date: Mon, 1 Jun 2020 18:11:04 +0300 Subject: [PATCH] Add missing forks to fork ID (#11747) --- ethcore/spec/src/spec.rs | 13 ++++++++++++- ethcore/sync/src/chain/fork_filter.rs | 17 +++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/ethcore/spec/src/spec.rs b/ethcore/spec/src/spec.rs index 61cfbea5c..daae94415 100644 --- a/ethcore/spec/src/spec.rs +++ b/ethcore/spec/src/spec.rs @@ -406,6 +406,7 @@ impl Spec { params.eip1344_transition, params.eip1884_transition, params.eip2028_transition, + params.eip2046_transition, params.eip2200_advance_transition, params.dust_protection_transition, params.wasm_activation_transition, @@ -425,7 +426,17 @@ impl Spec { ethjson::spec::Engine::Null(null) => Arc::new(NullEngine::new(null.params.into(), machine)), ethjson::spec::Engine::Ethash(ethash) => { // Specific transitions for Ethash-based networks - for block in &[ethash.params.homestead_transition, ethash.params.dao_hardfork_transition] { + for block in &[ + ethash.params.homestead_transition, + ethash.params.dao_hardfork_transition, + ethash.params.difficulty_hardfork_transition, + ethash.params.bomb_defuse_transition, + ethash.params.eip100b_transition, + ethash.params.ecip1010_pause_transition, + ethash.params.ecip1010_continue_transition, + ethash.params.ecip1017_era_rounds, + ethash.params.expip2_transition, + ] { if let Some(block) = *block { hard_forks.insert(block.into()); } diff --git a/ethcore/sync/src/chain/fork_filter.rs b/ethcore/sync/src/chain/fork_filter.rs index 144e98d82..63ed22cb4 100644 --- a/ethcore/sync/src/chain/fork_filter.rs +++ b/ethcore/sync/src/chain/fork_filter.rs @@ -140,4 +140,21 @@ mod tests { ], ) } + + #[test] + fn classic_spec() { + test_spec( + || spec::new_classic(&String::new()), + vec![ + 1150000, + 2500000, + 3000000, + 5000000, + 5900000, + 8772000, + 9573000, + 10500839, + ], + ) + } }