diff --git a/beacon_node/beacon_chain/tests/op_verification.rs b/beacon_node/beacon_chain/tests/op_verification.rs index 131570c8c..ef62e292b 100644 --- a/beacon_node/beacon_chain/tests/op_verification.rs +++ b/beacon_node/beacon_chain/tests/op_verification.rs @@ -32,8 +32,16 @@ fn get_store(db_path: &TempDir) -> Arc { let cold_path = db_path.path().join("cold_db"); let config = StoreConfig::default(); let log = NullLoggerBuilder.build().expect("logger should build"); - HotColdDB::open(&hot_path, &cold_path,None, |_, _, _| Ok(()), config, spec, log) - .expect("disk store should initialize") + HotColdDB::open( + &hot_path, + &cold_path, + None, + |_, _, _| Ok(()), + config, + spec, + log, + ) + .expect("disk store should initialize") } fn get_harness(store: Arc, validator_count: usize) -> TestHarness { diff --git a/beacon_node/beacon_chain/tests/store_tests.rs b/beacon_node/beacon_chain/tests/store_tests.rs index 999e1a188..5b55c99d9 100644 --- a/beacon_node/beacon_chain/tests/store_tests.rs +++ b/beacon_node/beacon_chain/tests/store_tests.rs @@ -60,8 +60,16 @@ fn get_store_with_spec( let config = StoreConfig::default(); let log = test_logger(); - HotColdDB::open(&hot_path, &cold_path, None, |_, _, _| Ok(()), config, spec, log) - .expect("disk store should initialize") + HotColdDB::open( + &hot_path, + &cold_path, + None, + |_, _, _| Ok(()), + config, + spec, + log, + ) + .expect("disk store should initialize") } fn get_harness( diff --git a/beacon_node/execution_layer/src/lib.rs b/beacon_node/execution_layer/src/lib.rs index 8aa9294b5..2a2ea9b45 100644 --- a/beacon_node/execution_layer/src/lib.rs +++ b/beacon_node/execution_layer/src/lib.rs @@ -41,14 +41,12 @@ use tokio::{ }; use tokio_stream::wrappers::WatchStream; use types::consts::eip4844::BLOB_TX_TYPE; +use types::transaction::{AccessTuple, BlobTransaction, EcdsaSignature, SignedBlobTransaction}; use types::{ blobs_sidecar::{Blobs, KzgCommitments}, ExecutionPayload, ExecutionPayloadCapella, ExecutionPayloadEip4844, ExecutionPayloadMerge, }; -use types::transaction::{AccessTuple, BlobTransaction, EcdsaSignature, SignedBlobTransaction}; -use types::{ - AbstractExecPayload, BeaconStateError, ExecPayload, VersionedHash, -}; +use types::{AbstractExecPayload, BeaconStateError, ExecPayload, VersionedHash}; use types::{ BlindedPayload, BlockType, ChainSpec, Epoch, ExecutionBlockHash, ForkName, ProposerPreparationData, PublicKeyBytes, Signature, SignedBeaconBlock, Slot, Transaction, diff --git a/beacon_node/lighthouse_network/src/rpc/protocol.rs b/beacon_node/lighthouse_network/src/rpc/protocol.rs index c00e8914d..ea48251d6 100644 --- a/beacon_node/lighthouse_network/src/rpc/protocol.rs +++ b/beacon_node/lighthouse_network/src/rpc/protocol.rs @@ -408,15 +408,12 @@ impl ProtocolId { /// Returns `true` if the given `ProtocolId` should expect `context_bytes` in the /// beginning of the stream, else returns `false`. pub fn has_context_bytes(&self) -> bool { - match self.version { - Version::V2 => matches!( - self.message_name, - Protocol::BlocksByRange | Protocol::BlocksByRoot - ), - Version::V1 => matches!( - self.message_name, - Protocol::BlobsByRange | Protocol::BlobsByRoot - ), + match self.message_name { + Protocol::BlocksByRange | Protocol::BlocksByRoot => { + !matches!(self.version, Version::V1) + } + Protocol::BlobsByRange | Protocol::BlobsByRoot | Protocol::LightClientBootstrap => true, + Protocol::Goodbye | Protocol::Ping | Protocol::Status | Protocol::MetaData => false, } } }