Run `cargo fmt --all` (#1427)

This commit is contained in:
teor 2020-12-02 14:43:33 +10:00 committed by GitHub
parent 00c4f4f0e6
commit 4109534c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -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(())

View File

@ -274,7 +274,9 @@ async fn continuous_blockchain(restart_height: Option<block::Height>) -> 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))?;