Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oxarbitrage committed Sep 27, 2024
1 parent 211b327 commit abb3579
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion zebra-chain/src/parameters/network/subsidy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ impl ParameterSubsidy for Network {
} else if params.is_default_testnet() {
FIRST_HALVING_TESTNET
} else {
height_for_halving_index(1, self).unwrap()
height_for_halving_index(1, self)
.expect("first halving height should be available")
}
}
}
Expand Down
1 change: 0 additions & 1 deletion zebra-chain/src/parameters/network/tests/vectors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,4 +450,3 @@ fn check_configured_funding_stream_constraints() {
expected_panic_wrong_addr_network
.expect_err("should panic when recipient addresses are for Mainnet");
}

6 changes: 5 additions & 1 deletion zebra-consensus/src/block/subsidy/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,11 @@ mod test {
fn check_height_for_num_halvings() {
for network in Network::iter() {
for halving_index in 1..1000 {
let Some(height_for_halving) = zebra_chain::parameters::subsidy::height_for_halving_index(halving_index, &network)
let Some(height_for_halving) =
zebra_chain::parameters::subsidy::height_for_halving_index(
halving_index,
&network,
)
else {
panic!("could not find height for halving {halving_index}");
};
Expand Down

0 comments on commit abb3579

Please sign in to comment.