mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-19 21:04:41 +00:00
Getting attestation slot via helper method
This commit is contained in:
@@ -174,13 +174,13 @@ impl<T: BeaconChainTypes> ForkChoice<T> {
|
||||
&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())
|
||||
|
||||
Reference in New Issue
Block a user