From d2ecbd942e0de1ace2b463963fc7fbc0842c1b31 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Mon, 13 Feb 2023 17:13:47 -0500 Subject: [PATCH] fix a couple new lints --- beacon_node/execution_layer/src/lib.rs | 2 +- beacon_node/http_api/src/block_id.rs | 2 +- beacon_node/network/src/sync/network_context.rs | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 9ed2e23c43..2018059cbd 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -2160,7 +2160,7 @@ fn ethers_tx_to_bytes( .ok_or(BlobTxConversionError::BlobVersionedHashesMissing)? .as_array() .ok_or(BlobTxConversionError::BlobVersionedHashesMissing)? - .into_iter() + .iter() .map(|versioned_hash| { let hash_bytes = eth2_serde_utils::hex::decode( versioned_hash diff --git a/beacon_node/http_api/src/block_id.rs b/beacon_node/http_api/src/block_id.rs index e8d463bbe5..b484f4079a 100644 --- a/beacon_node/http_api/src/block_id.rs +++ b/beacon_node/http_api/src/block_id.rs @@ -227,7 +227,7 @@ impl BlockId { "Blob with block root {} is not in the store", root ))), - Err(e) => Err(warp_utils::reject::beacon_chain_error(e.into())), + Err(e) => Err(warp_utils::reject::beacon_chain_error(e)), } } } diff --git a/beacon_node/network/src/sync/network_context.rs b/beacon_node/network/src/sync/network_context.rs index 2e8becb9cf..ef8f872cbf 100644 --- a/beacon_node/network/src/sync/network_context.rs +++ b/beacon_node/network/src/sync/network_context.rs @@ -562,6 +562,8 @@ impl SyncNetworkContext { /// blocks and blobs. #[allow(unused)] pub fn batch_type(&self, epoch: types::Epoch) -> ByRangeRequestType { + // Induces a compile time panic if this doesn't hold true. + #[allow(clippy::assertions_on_constants)] const _: () = assert!( super::backfill_sync::BACKFILL_EPOCHS_PER_BATCH == 1 && super::range_sync::EPOCHS_PER_BATCH == 1,