Run `cargo fmt --all` (#1427)
This commit is contained in:
parent
00c4f4f0e6
commit
4109534c9b
|
@ -307,8 +307,7 @@ fn block_difficulty_for_network(network: Network) -> Result<(), Report> {
|
||||||
{
|
{
|
||||||
let canonical_compact = threshold.to_compact();
|
let canonical_compact = threshold.to_compact();
|
||||||
|
|
||||||
assert_eq!(block.header.difficulty_threshold,
|
assert_eq!(block.header.difficulty_threshold, canonical_compact);
|
||||||
canonical_compact);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// SPANDOC: Check the work for block {?height, ?network}
|
/// 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}
|
/// SPANDOC: Check the genesis PoWLimit {?network, ?threshold, ?hash}
|
||||||
{
|
{
|
||||||
assert_eq!(threshold, ExpandedDifficulty::target_difficulty_limit(network),
|
assert_eq!(
|
||||||
"genesis block difficulty thresholds must be equal to the PoWLimit");
|
threshold,
|
||||||
|
ExpandedDifficulty::target_difficulty_limit(network),
|
||||||
|
"genesis block difficulty thresholds must be equal to the PoWLimit"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -274,7 +274,9 @@ async fn continuous_blockchain(restart_height: Option<block::Height>) -> Result<
|
||||||
let initial_tip = restart_height.map(|block::Height(height)| {
|
let initial_tip = restart_height.map(|block::Height(height)| {
|
||||||
(blockchain[height as usize].1, blockchain[height as usize].2)
|
(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 =
|
let mut checkpoint_verifier =
|
||||||
CheckpointVerifier::from_list(checkpoint_list, initial_tip, state_service.clone())
|
CheckpointVerifier::from_list(checkpoint_list, initial_tip, state_service.clone())
|
||||||
.map_err(|e| eyre!(e))?;
|
.map_err(|e| eyre!(e))?;
|
||||||
|
|
Loading…
Reference in New Issue