mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-04 21:34:36 +00:00
lint
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -1661,12 +1661,7 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
|
||||
.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.
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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::{
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user