Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Add missing forks to fork ID (#11747)
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 authored and adria0 committed Jun 9, 2020
1 parent 6665e8d commit 66d11ba
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
13 changes: 12 additions & 1 deletion ethcore/spec/src/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,7 @@ impl Spec {
params.eip1344_transition,
params.eip1884_transition,
params.eip2028_transition,
params.eip2046_transition,
params.eip2200_advance_transition,
params.eip2315_transition,
params.dust_protection_transition,
Expand All @@ -426,7 +427,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());
}
Expand Down
17 changes: 17 additions & 0 deletions ethcore/sync/src/chain/fork_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
)
}
}

0 comments on commit 66d11ba

Please sign in to comment.