mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-16 11:22:56 +00:00
Plumb reward cache through reward calc
This commit is contained in:
@@ -3,7 +3,7 @@ use itertools::Itertools;
|
||||
use std::collections::HashMap;
|
||||
use types::{
|
||||
AggregateSignature, Attestation, AttestationData, BeaconState, BitList, Checkpoint, Epoch,
|
||||
EthSpec, Hash256, IndexedAttestation, Slot,
|
||||
EthSpec, Hash256, Slot,
|
||||
};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
|
||||
@@ -188,7 +188,7 @@ impl<T: EthSpec> AttestationMap<T> {
|
||||
}
|
||||
|
||||
/// Iterate all attestations in the map.
|
||||
pub fn iter<'a>(&'a self) -> impl Iterator<Item = AttestationRef<'a, T>> + 'a {
|
||||
pub fn iter(&self) -> impl Iterator<Item = AttestationRef<T>> {
|
||||
self.checkpoint_map
|
||||
.iter()
|
||||
.flat_map(|(checkpoint_key, attestation_map)| attestation_map.iter(checkpoint_key))
|
||||
|
||||
@@ -30,7 +30,7 @@ use std::ptr;
|
||||
use types::{
|
||||
sync_aggregate::Error as SyncAggregateError, typenum::Unsigned, Attestation, AttestationData,
|
||||
AttesterSlashing, BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, Fork, ForkVersion,
|
||||
Hash256, ProposerSlashing, SignedVoluntaryExit, Slot, SyncAggregate, SyncCommitteeContribution,
|
||||
ProposerSlashing, SignedVoluntaryExit, Slot, SyncAggregate, SyncCommitteeContribution,
|
||||
Validator,
|
||||
};
|
||||
|
||||
@@ -206,6 +206,7 @@ impl<T: EthSpec> OperationPool<T> {
|
||||
}
|
||||
|
||||
/// Return all valid attestations for the given epoch, for use in max cover.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn get_valid_attestations_for_epoch<'a>(
|
||||
&'a self,
|
||||
checkpoint_key: &'a CheckpointKey,
|
||||
|
||||
Reference in New Issue
Block a user