Skip to content

Commit

Permalink
avoid unnecessary panic
Browse files Browse the repository at this point in the history
  • Loading branch information
arya2 committed Sep 26, 2024
1 parent e06f1c9 commit 13eb9b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zebra-consensus/src/block/subsidy/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn num_halvings(height: Height, network: &Network) -> u32 {
.expect("blossom activation height should be available");

let halving_index = if height < slow_start_shift {
panic!("unsupported block height {height:?}: checkpoints should handle blocks below {slow_start_shift:?}")
0
} else if height < blossom_height {
let pre_blossom_height = height - slow_start_shift;
pre_blossom_height / PRE_BLOSSOM_HALVING_INTERVAL
Expand Down

0 comments on commit 13eb9b4

Please sign in to comment.