diff --git a/beacon_node/network/src/sync/network_context.rs b/beacon_node/network/src/sync/network_context.rs index beeba9e9b..2e8becb9c 100644 --- a/beacon_node/network/src/sync/network_context.rs +++ b/beacon_node/network/src/sync/network_context.rs @@ -562,13 +562,12 @@ impl SyncNetworkContext { /// blocks and blobs. #[allow(unused)] pub fn batch_type(&self, epoch: types::Epoch) -> ByRangeRequestType { - if super::backfill_sync::BACKFILL_EPOCHS_PER_BATCH * super::range_sync::EPOCHS_PER_BATCH - != 1 - { - panic!( - "To deal with alignment with 4844 boundaries, batches need to be of just one epoch" - ); - } + const _: () = assert!( + super::backfill_sync::BACKFILL_EPOCHS_PER_BATCH == 1 + && super::range_sync::EPOCHS_PER_BATCH == 1, + "To deal with alignment with 4844 boundaries, batches need to be of just one epoch" + ); + #[cfg(test)] { // Keep tests only for blocks.