mirror of
https://github.com/sigp/lighthouse.git
synced 2026-07-03 12:54:27 +00:00
lint
This commit is contained in:
@@ -85,8 +85,8 @@ use execution_layer::{
|
|||||||
};
|
};
|
||||||
use fixed_bytes::FixedBytesExtended;
|
use fixed_bytes::FixedBytesExtended;
|
||||||
use fork_choice::{
|
use fork_choice::{
|
||||||
ExecutionStatus, ForkChoice, ForkchoiceUpdateParameters,
|
ExecutionStatus, ForkChoice, ForkchoiceUpdateParameters, InvalidationOperation,
|
||||||
InvalidationOperation, PayloadVerificationStatus, ResetPayloadStatuses,
|
PayloadVerificationStatus, ResetPayloadStatuses,
|
||||||
};
|
};
|
||||||
use futures::channel::mpsc::Sender;
|
use futures::channel::mpsc::Sender;
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
|||||||
@@ -1661,12 +1661,7 @@ impl<T: BeaconChainTypes> ExecutionPendingBlock<T> {
|
|||||||
.get_indexed_attestation(&state, attestation)
|
.get_indexed_attestation(&state, attestation)
|
||||||
.map_err(|e| BlockError::PerBlockProcessingError(e.into_with_index(i)))?;
|
.map_err(|e| BlockError::PerBlockProcessingError(e.into_with_index(i)))?;
|
||||||
|
|
||||||
match fork_choice.on_attestation(
|
match fork_choice.on_attestation(current_slot, indexed_attestation, true, &chain.spec) {
|
||||||
current_slot,
|
|
||||||
indexed_attestation,
|
|
||||||
true,
|
|
||||||
&chain.spec,
|
|
||||||
) {
|
|
||||||
Ok(()) => Ok(()),
|
Ok(()) => Ok(()),
|
||||||
// Ignore invalid attestations whilst importing attestations from a block. The
|
// Ignore invalid attestations whilst importing attestations from a block. The
|
||||||
// block might be very old and therefore the attestations useless to fork choice.
|
// 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.
|
/// 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`.
|
/// Parameters which are cached between calls to `ForkChoice::get_head`.
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub struct ForkchoiceUpdateParameters {
|
pub struct ForkchoiceUpdateParameters {
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ mod fork_choice_store;
|
|||||||
mod metrics;
|
mod metrics;
|
||||||
|
|
||||||
pub use crate::fork_choice::{
|
pub use crate::fork_choice::{
|
||||||
Error, ForkChoice, ForkChoiceView, ForkchoiceUpdateParameters,
|
Error, ForkChoice, ForkChoiceView, ForkchoiceUpdateParameters, InvalidAttestation,
|
||||||
InvalidAttestation, InvalidBlock, PayloadVerificationStatus, PersistedForkChoice,
|
InvalidBlock, PayloadVerificationStatus, PersistedForkChoice, PersistedForkChoiceV17,
|
||||||
PersistedForkChoiceV17, PersistedForkChoiceV28, PersistedForkChoiceV29, QueuedAttestation,
|
PersistedForkChoiceV28, PersistedForkChoiceV29, QueuedAttestation, QueuedPayloadAttestation,
|
||||||
QueuedPayloadAttestation, ResetPayloadStatuses,
|
ResetPayloadStatuses,
|
||||||
};
|
};
|
||||||
pub use fork_choice_store::ForkChoiceStore;
|
pub use fork_choice_store::ForkChoiceStore;
|
||||||
pub use proto_array::{
|
pub use proto_array::{
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ use beacon_chain::{
|
|||||||
use bls::AggregateSignature;
|
use bls::AggregateSignature;
|
||||||
use fixed_bytes::FixedBytesExtended;
|
use fixed_bytes::FixedBytesExtended;
|
||||||
use fork_choice::{
|
use fork_choice::{
|
||||||
ForkChoiceStore, InvalidAttestation, InvalidBlock,
|
ForkChoiceStore, InvalidAttestation, InvalidBlock, PayloadVerificationStatus,
|
||||||
PayloadVerificationStatus, QueuedAttestation, QueuedPayloadAttestation,
|
QueuedAttestation, QueuedPayloadAttestation,
|
||||||
};
|
};
|
||||||
use state_processing::state_advance::complete_state_advance;
|
use state_processing::state_advance::complete_state_advance;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
@@ -1030,11 +1030,7 @@ async fn payload_attestation_for_previous_slot_is_accepted_at_next_slot() {
|
|||||||
let result = chain
|
let result = chain
|
||||||
.canonical_head
|
.canonical_head
|
||||||
.fork_choice_write_lock()
|
.fork_choice_write_lock()
|
||||||
.on_payload_attestation(
|
.on_payload_attestation(current_slot, &payload_attestation, true);
|
||||||
current_slot,
|
|
||||||
&payload_attestation,
|
|
||||||
true,
|
|
||||||
);
|
|
||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
result.is_ok(),
|
result.is_ok(),
|
||||||
|
|||||||
Reference in New Issue
Block a user