From 5db0a88d4f4fed0854e77be0ccdd84842f8aea82 Mon Sep 17 00:00:00 2001 From: realbigsean Date: Fri, 23 Dec 2022 10:27:01 -0500 Subject: [PATCH] fix compilation errors from merge --- .../lighthouse_network/src/rpc/codec/ssz_snappy.rs | 5 ++++- lcli/Cargo.toml | 1 - testing/ef_tests/Cargo.toml | 1 - testing/ef_tests/src/cases/operations.rs | 13 +++++-------- 4 files changed, 9 insertions(+), 11 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 d69b42c0be..df5350d949 100644 --- a/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs +++ b/beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs @@ -719,7 +719,10 @@ fn context_bytes_to_fork_name( let encoded = hex::encode(context_bytes); RPCError::ErrorResponse( RPCResponseErrorCode::InvalidRequest, - format!("Context bytes {} do not correspond to a valid fork", encoded), + format!( + "Context bytes {} do not correspond to a valid fork", + encoded + ), ) }) } diff --git a/lcli/Cargo.toml b/lcli/Cargo.toml index 4130c0f6af..0da6b6f090 100644 --- a/lcli/Cargo.toml +++ b/lcli/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" [features] portable = ["bls/supranational-portable"] fake_crypto = ['bls/fake_crypto'] -withdrawals = ["types/withdrawals", "beacon_chain/withdrawals", "store/withdrawals", "state_processing/withdrawals"] withdrawals-processing = ["beacon_chain/withdrawals-processing", "store/withdrawals-processing", "state_processing/withdrawals-processing"] [dependencies] diff --git a/testing/ef_tests/Cargo.toml b/testing/ef_tests/Cargo.toml index 1b42b42ff1..23bb29364d 100644 --- a/testing/ef_tests/Cargo.toml +++ b/testing/ef_tests/Cargo.toml @@ -9,7 +9,6 @@ edition = "2021" ef_tests = [] milagro = ["bls/milagro"] fake_crypto = ["bls/fake_crypto"] -withdrawals = ["state_processing/withdrawals", "store/withdrawals", "beacon_chain/withdrawals", "types/withdrawals", "execution_layer/withdrawals"] withdrawals-processing = ["state_processing/withdrawals-processing", "store/withdrawals-processing", "beacon_chain/withdrawals-processing", "execution_layer/withdrawals-processing"] [dependencies] diff --git a/testing/ef_tests/src/cases/operations.rs b/testing/ef_tests/src/cases/operations.rs index dd43eeccef..a2356519ad 100644 --- a/testing/ef_tests/src/cases/operations.rs +++ b/testing/ef_tests/src/cases/operations.rs @@ -5,9 +5,9 @@ use crate::decode::{ssz_decode_file, ssz_decode_file_with, ssz_decode_state, yam use crate::testing_spec; use serde_derive::Deserialize; #[cfg(feature = "withdrawals-processing")] -use state_processing::per_block_processing::process_operations::{ - process_bls_to_execution_changes, process_bls_to_execution_changes, -}; +use state_processing::per_block_processing::process_operations::process_bls_to_execution_changes; +#[cfg(feature = "withdrawals-processing")] +use state_processing::per_block_processing::process_withdrawals; use state_processing::{ per_block_processing::{ errors::BlockProcessingError, @@ -356,10 +356,6 @@ impl Operation for WithdrawalsPayload { return false; } - if !cfg!(feature = "withdrawals") { - return false; - } - fork_name != ForkName::Base && fork_name != ForkName::Altair && fork_name != ForkName::Merge } @@ -372,7 +368,7 @@ impl Operation for WithdrawalsPayload { }) } - #[cfg(feature = "withdrawals")] + #[cfg(feature = "withdrawals-processing")] fn apply_to( &self, state: &mut BeaconState, @@ -386,6 +382,7 @@ impl Operation for WithdrawalsPayload { process_withdrawals::<_, FullPayload<_>>(state, self.payload.to_ref(), spec) } } +} #[cfg(feature = "withdrawals-processing")] impl Operation for SignedBlsToExecutionChange {