diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index a5beb4d2b8..9dc1a5206e 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -85,8 +85,8 @@ use execution_layer::{ }; use fixed_bytes::FixedBytesExtended; use fork_choice::{ - ExecutionStatus, ForkChoice, ForkchoiceUpdateParameters, - InvalidationOperation, PayloadVerificationStatus, ResetPayloadStatuses, + ExecutionStatus, ForkChoice, ForkchoiceUpdateParameters, InvalidationOperation, + PayloadVerificationStatus, ResetPayloadStatuses, }; use futures::channel::mpsc::Sender; use itertools::Itertools; diff --git a/beacon_node/beacon_chain/src/block_verification.rs b/beacon_node/beacon_chain/src/block_verification.rs index 41daa2c460..ab60b8b955 100644 --- a/beacon_node/beacon_chain/src/block_verification.rs +++ b/beacon_node/beacon_chain/src/block_verification.rs @@ -1661,12 +1661,7 @@ impl ExecutionPendingBlock { .get_indexed_attestation(&state, attestation) .map_err(|e| BlockError::PerBlockProcessingError(e.into_with_index(i)))?; - match fork_choice.on_attestation( - current_slot, - indexed_attestation, - true, - &chain.spec, - ) { + match fork_choice.on_attestation(current_slot, indexed_attestation, true, &chain.spec) { Ok(()) => Ok(()), // Ignore invalid attestations whilst importing attestations from a block. The // block might be very old and therefore the attestations useless to fork choice. diff --git a/consensus/fork_choice/src/fork_choice.rs b/consensus/fork_choice/src/fork_choice.rs index 26361c7941..112c86eee6 100644 --- a/consensus/fork_choice/src/fork_choice.rs +++ b/consensus/fork_choice/src/fork_choice.rs @@ -312,7 +312,6 @@ fn dequeue_payload_attestations( } /// Denotes whether an attestation we are processing was received from a block or from gossip. - /// Parameters which are cached between calls to `ForkChoice::get_head`. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ForkchoiceUpdateParameters { diff --git a/consensus/fork_choice/src/lib.rs b/consensus/fork_choice/src/lib.rs index d3a9d24622..824fc2dff0 100644 --- a/consensus/fork_choice/src/lib.rs +++ b/consensus/fork_choice/src/lib.rs @@ -3,10 +3,10 @@ mod fork_choice_store; mod metrics; pub use crate::fork_choice::{ - Error, ForkChoice, ForkChoiceView, ForkchoiceUpdateParameters, - InvalidAttestation, InvalidBlock, PayloadVerificationStatus, PersistedForkChoice, - PersistedForkChoiceV17, PersistedForkChoiceV28, PersistedForkChoiceV29, QueuedAttestation, - QueuedPayloadAttestation, ResetPayloadStatuses, + Error, ForkChoice, ForkChoiceView, ForkchoiceUpdateParameters, InvalidAttestation, + InvalidBlock, PayloadVerificationStatus, PersistedForkChoice, PersistedForkChoiceV17, + PersistedForkChoiceV28, PersistedForkChoiceV29, QueuedAttestation, QueuedPayloadAttestation, + ResetPayloadStatuses, }; pub use fork_choice_store::ForkChoiceStore; pub use proto_array::{ diff --git a/consensus/fork_choice/tests/tests.rs b/consensus/fork_choice/tests/tests.rs index eea94b2e77..da5405f06d 100644 --- a/consensus/fork_choice/tests/tests.rs +++ b/consensus/fork_choice/tests/tests.rs @@ -10,8 +10,8 @@ use beacon_chain::{ use bls::AggregateSignature; use fixed_bytes::FixedBytesExtended; use fork_choice::{ - ForkChoiceStore, InvalidAttestation, InvalidBlock, - PayloadVerificationStatus, QueuedAttestation, QueuedPayloadAttestation, + ForkChoiceStore, InvalidAttestation, InvalidBlock, PayloadVerificationStatus, + QueuedAttestation, QueuedPayloadAttestation, }; use state_processing::state_advance::complete_state_advance; use std::fmt; @@ -1030,11 +1030,7 @@ async fn payload_attestation_for_previous_slot_is_accepted_at_next_slot() { let result = chain .canonical_head .fork_choice_write_lock() - .on_payload_attestation( - current_slot, - &payload_attestation, - true, - ); + .on_payload_attestation(current_slot, &payload_attestation, true); assert!( result.is_ok(),