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

Commit

Permalink
Create spec once in fork filter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vorot93 committed Feb 11, 2020
1 parent 686b922 commit da13db5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ethcore/sync/src/chain/fork_filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,11 @@ mod tests {
fn test_spec<F: Fn() -> Spec>(spec_builder: F, forks: Vec<BlockNumber>) {
let spec = (spec_builder)();
let genesis_hash = spec.genesis_header().hash();
let client = TestBlockChainClient::new_with_spec((spec_builder)());
let engine = spec.engine.clone();
let client = TestBlockChainClient::new_with_spec(spec);

assert_eq!(
ForkFilterApi::new(&client, &*spec.engine).inner,
ForkFilterApi::new(&client, &*engine).inner,
ForkFilter::new(0, genesis_hash, forks)
);
}
Expand Down

0 comments on commit da13db5

Please sign in to comment.