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

Commit

Permalink
cargo +nightly fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed Sep 1, 2021
1 parent f7d891e commit e4471f7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions node/service/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,12 +419,14 @@ fn run_specialized_test_w_harness<F: FnOnce() -> CaseVars>(case_var_provider: F)

// Verify test integrity: the provided highest approved
// ancestor must match the chain derived one.
let highest_approved_ancestor_w_desc =
best_chain_containing_block.and_then(|best_chain_containing_block| {
let highest_approved_ancestor_w_desc = best_chain_containing_block
.and_then(|best_chain_containing_block| {
chain.blocks_by_hash.get(&target_block).map(|target_block_header| {
let target_blocknumber = target_block_header.number;
let highest_approved_ancestor_w_desc =
chain.highest_approved_ancestors(target_blocknumber, best_chain_containing_block);
let highest_approved_ancestor_w_desc = chain.highest_approved_ancestors(
target_blocknumber,
best_chain_containing_block,
);
if let (
Some(highest_approved_ancestor_w_desc),
Some(highest_approved_ancestor_block),
Expand All @@ -436,10 +438,8 @@ fn run_specialized_test_w_harness<F: FnOnce() -> CaseVars>(case_var_provider: F)
highest_approved_ancestor_block, highest_approved_ancestor_w_desc.hash,
);

let expected = chain.undisputed_chain(
target_blocknumber,
highest_approved_ancestor_block,
);
let expected = chain
.undisputed_chain(target_blocknumber, highest_approved_ancestor_block);

assert_eq!(
expected, undisputed_chain,
Expand Down

0 comments on commit e4471f7

Please sign in to comment.