From 4109534c9b744083448d756349308ebd64faf8f8 Mon Sep 17 00:00:00 2001 From: teor Date: Wed, 2 Dec 2020 14:43:33 +1000 Subject: [PATCH] Run `cargo fmt --all` (#1427) --- zebra-chain/src/work/difficulty/tests/vectors.rs | 10 ++++++---- zebra-consensus/src/checkpoint/tests.rs | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/zebra-chain/src/work/difficulty/tests/vectors.rs b/zebra-chain/src/work/difficulty/tests/vectors.rs index b1637f26..1d07acf2 100644 --- a/zebra-chain/src/work/difficulty/tests/vectors.rs +++ b/zebra-chain/src/work/difficulty/tests/vectors.rs @@ -307,8 +307,7 @@ fn block_difficulty_for_network(network: Network) -> Result<(), Report> { { let canonical_compact = threshold.to_compact(); - assert_eq!(block.header.difficulty_threshold, - canonical_compact); + assert_eq!(block.header.difficulty_threshold, canonical_compact); } /// SPANDOC: Check the work for block {?height, ?network} @@ -367,8 +366,11 @@ fn genesis_block_difficulty_for_network(network: Network) -> Result<(), Report> /// SPANDOC: Check the genesis PoWLimit {?network, ?threshold, ?hash} { - assert_eq!(threshold, ExpandedDifficulty::target_difficulty_limit(network), - "genesis block difficulty thresholds must be equal to the PoWLimit"); + assert_eq!( + threshold, + ExpandedDifficulty::target_difficulty_limit(network), + "genesis block difficulty thresholds must be equal to the PoWLimit" + ); } Ok(()) diff --git a/zebra-consensus/src/checkpoint/tests.rs b/zebra-consensus/src/checkpoint/tests.rs index d29d5069..f54315a1 100644 --- a/zebra-consensus/src/checkpoint/tests.rs +++ b/zebra-consensus/src/checkpoint/tests.rs @@ -274,7 +274,9 @@ async fn continuous_blockchain(restart_height: Option) -> Result< let initial_tip = restart_height.map(|block::Height(height)| { (blockchain[height as usize].1, blockchain[height as usize].2) }); - let state_service = ServiceBuilder::new().buffer(1).service(zebra_state::init(zebra_state::Config::ephemeral(), Mainnet)); + let state_service = ServiceBuilder::new() + .buffer(1) + .service(zebra_state::init(zebra_state::Config::ephemeral(), Mainnet)); let mut checkpoint_verifier = CheckpointVerifier::from_list(checkpoint_list, initial_tip, state_service.clone()) .map_err(|e| eyre!(e))?;