diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 67d928127..8a9421a1b 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -10,7 +10,7 @@ use operation_pool::{OperationPool, PersistedOperationPool}; use parking_lot::{RwLock, RwLockReadGuard}; use slot_clock::SlotClock; use state_processing::per_block_processing::errors::{ - AttestationValidationError, AttesterSlashingValidationError, DepositValidationError, + AttesterSlashingValidationError, DepositValidationError, ExitValidationError, ProposerSlashingValidationError, TransferValidationError, }; use state_processing::{ diff --git a/beacon_node/beacon_chain/src/fork_choice.rs b/beacon_node/beacon_chain/src/fork_choice.rs index 92b683590..0f98ac9ce 100644 --- a/beacon_node/beacon_chain/src/fork_choice.rs +++ b/beacon_node/beacon_chain/src/fork_choice.rs @@ -174,13 +174,13 @@ impl ForkChoice { &attestation.aggregation_bitfield, )?; - let target_slot = attestation.data.target_epoch.start_slot(T::EthSpec::slots_per_epoch()); + let block_slot = state.get_attestation_slot(&attestation.data)?; Ok(validator_indices .iter() .find(|&&v| { match self.backend.latest_message(v) { - Some((_, slot)) => target_slot > slot, + Some((_, slot)) => block_slot > slot, None => true } }).is_some())