mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2025-01-03 17:54:28 +00:00
Added stuff that NEEDS IMPLEMENTING
This commit is contained in:
parent
2d01ae6036
commit
2191242341
@ -32,7 +32,8 @@ use std::ptr;
|
|||||||
use types::{
|
use types::{
|
||||||
sync_aggregate::Error as SyncAggregateError, typenum::Unsigned, Attestation, AttestationData,
|
sync_aggregate::Error as SyncAggregateError, typenum::Unsigned, Attestation, AttestationData,
|
||||||
AttesterSlashing, BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, ProposerSlashing,
|
AttesterSlashing, BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, ProposerSlashing,
|
||||||
SignedVoluntaryExit, Slot, SyncAggregate, SyncCommitteeContribution, Validator,
|
SignedBlsToExecutionChange, SignedVoluntaryExit, Slot, SyncAggregate,
|
||||||
|
SyncCommitteeContribution, Validator,
|
||||||
};
|
};
|
||||||
|
|
||||||
type SyncContributions<T> = RwLock<HashMap<SyncAggregateId, Vec<SyncCommitteeContribution<T>>>>;
|
type SyncContributions<T> = RwLock<HashMap<SyncAggregateId, Vec<SyncCommitteeContribution<T>>>>;
|
||||||
@ -49,6 +50,8 @@ pub struct OperationPool<T: EthSpec + Default> {
|
|||||||
proposer_slashings: RwLock<HashMap<u64, SigVerifiedOp<ProposerSlashing, T>>>,
|
proposer_slashings: RwLock<HashMap<u64, SigVerifiedOp<ProposerSlashing, T>>>,
|
||||||
/// Map from exiting validator to their exit data.
|
/// Map from exiting validator to their exit data.
|
||||||
voluntary_exits: RwLock<HashMap<u64, SigVerifiedOp<SignedVoluntaryExit, T>>>,
|
voluntary_exits: RwLock<HashMap<u64, SigVerifiedOp<SignedVoluntaryExit, T>>>,
|
||||||
|
/// Map from credential changing validator to their execution change data.
|
||||||
|
bls_to_execution_changes: RwLock<HashMap<u64, SigVerifiedOp<SignedBlsToExecutionChange, T>>>,
|
||||||
/// Reward cache for accelerating attestation packing.
|
/// Reward cache for accelerating attestation packing.
|
||||||
reward_cache: RwLock<RewardCache>,
|
reward_cache: RwLock<RewardCache>,
|
||||||
_phantom: PhantomData<T>,
|
_phantom: PhantomData<T>,
|
||||||
@ -509,6 +512,16 @@ impl<T: EthSpec> OperationPool<T> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get a list of execution changes for inclusion in a block.
|
||||||
|
pub fn get_bls_to_execution_changes(
|
||||||
|
&self,
|
||||||
|
state: &BeaconState<T>,
|
||||||
|
spec: &ChainSpec,
|
||||||
|
) -> Vec<SignedBlsToExecutionChange> {
|
||||||
|
// FIXME: actually implement this
|
||||||
|
return vec![];
|
||||||
|
}
|
||||||
|
|
||||||
/// Prune all types of transactions given the latest head state and head fork.
|
/// Prune all types of transactions given the latest head state and head fork.
|
||||||
pub fn prune_all(&self, head_state: &BeaconState<T>, current_epoch: Epoch) {
|
pub fn prune_all(&self, head_state: &BeaconState<T>, current_epoch: Epoch) {
|
||||||
self.prune_attestations(current_epoch);
|
self.prune_attestations(current_epoch);
|
||||||
|
@ -142,6 +142,8 @@ impl<T: EthSpec> PersistedOperationPool<T> {
|
|||||||
attester_slashings,
|
attester_slashings,
|
||||||
proposer_slashings,
|
proposer_slashings,
|
||||||
voluntary_exits,
|
voluntary_exits,
|
||||||
|
// FIXME: IMPLEMENT THIS
|
||||||
|
bls_to_execution_changes: Default::default(),
|
||||||
reward_cache: Default::default(),
|
reward_cache: Default::default(),
|
||||||
_phantom: Default::default(),
|
_phantom: Default::default(),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user