From ab86b4287428e08ce3d6616d7516490c6ebf7046 Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 30 Nov 2021 13:33:10 +1100 Subject: [PATCH] Kintsugi Diva comments (#2836) * Remove TODOs * Fix typo --- beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs | 3 --- beacon_node/lighthouse_network/src/rpc/protocol.rs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs b/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs index c6d20d91e..f5d7232a6 100644 --- a/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs +++ b/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs @@ -391,7 +391,6 @@ fn context_bytes( // NOTE: If you are adding another fork type here, be sure to modify the // `fork_context.to_context_bytes()` function to support it as well! SignedBeaconBlock::Merge { .. } => { - // TODO: check this // Merge context being `None` implies that "merge never happened". fork_context.to_context_bytes(ForkName::Merge) } @@ -561,7 +560,6 @@ fn handle_v2_response( ForkName::Base => Ok(Some(RPCResponse::BlocksByRange(Box::new( SignedBeaconBlock::Base(SignedBeaconBlockBase::from_ssz_bytes(decoded_buffer)?), )))), - // TODO: check this (though it seems okay) ForkName::Merge => Ok(Some(RPCResponse::BlocksByRange(Box::new( SignedBeaconBlock::Merge(SignedBeaconBlockMerge::from_ssz_bytes( decoded_buffer, @@ -577,7 +575,6 @@ fn handle_v2_response( ForkName::Base => Ok(Some(RPCResponse::BlocksByRoot(Box::new( SignedBeaconBlock::Base(SignedBeaconBlockBase::from_ssz_bytes(decoded_buffer)?), )))), - // TODO: check this (though it seems right) ForkName::Merge => Ok(Some(RPCResponse::BlocksByRoot(Box::new( SignedBeaconBlock::Merge(SignedBeaconBlockMerge::from_ssz_bytes( decoded_buffer, diff --git a/beacon_node/lighthouse_network/src/rpc/protocol.rs b/beacon_node/lighthouse_network/src/rpc/protocol.rs index 9d48887ea..a6a015878 100644 --- a/beacon_node/lighthouse_network/src/rpc/protocol.rs +++ b/beacon_node/lighthouse_network/src/rpc/protocol.rs @@ -206,7 +206,7 @@ impl RpcLimits { Self { min, max } } - /// Returns true if the given length is is greater than `MAX_RPC_SIZE` or out of + /// Returns true if the given length is greater than `MAX_RPC_SIZE` or out of /// bounds for the given ssz type, returns false otherwise. pub fn is_out_of_bounds(&self, length: usize, max_rpc_size: usize) -> bool { length > std::cmp::min(self.max, max_rpc_size) || length < self.min