From 219124234150759ee9d7a90c55fb9c44b77ca27c Mon Sep 17 00:00:00 2001 From: Mark Mackey Date: Wed, 9 Nov 2022 19:35:01 -0600 Subject: [PATCH] Added stuff that NEEDS IMPLEMENTING --- beacon_node/operation_pool/src/lib.rs | 15 ++++++++++++++- beacon_node/operation_pool/src/persistence.rs | 2 ++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/beacon_node/operation_pool/src/lib.rs b/beacon_node/operation_pool/src/lib.rs index 4fe5a7254..ba0567277 100644 --- a/beacon_node/operation_pool/src/lib.rs +++ b/beacon_node/operation_pool/src/lib.rs @@ -32,7 +32,8 @@ use std::ptr; use types::{ sync_aggregate::Error as SyncAggregateError, typenum::Unsigned, Attestation, AttestationData, AttesterSlashing, BeaconState, BeaconStateError, ChainSpec, Epoch, EthSpec, ProposerSlashing, - SignedVoluntaryExit, Slot, SyncAggregate, SyncCommitteeContribution, Validator, + SignedBlsToExecutionChange, SignedVoluntaryExit, Slot, SyncAggregate, + SyncCommitteeContribution, Validator, }; type SyncContributions = RwLock>>>; @@ -49,6 +50,8 @@ pub struct OperationPool { proposer_slashings: RwLock>>, /// Map from exiting validator to their exit data. voluntary_exits: RwLock>>, + /// Map from credential changing validator to their execution change data. + bls_to_execution_changes: RwLock>>, /// Reward cache for accelerating attestation packing. reward_cache: RwLock, _phantom: PhantomData, @@ -509,6 +512,16 @@ impl OperationPool { ); } + /// Get a list of execution changes for inclusion in a block. + pub fn get_bls_to_execution_changes( + &self, + state: &BeaconState, + spec: &ChainSpec, + ) -> Vec { + // FIXME: actually implement this + return vec![]; + } + /// Prune all types of transactions given the latest head state and head fork. pub fn prune_all(&self, head_state: &BeaconState, current_epoch: Epoch) { self.prune_attestations(current_epoch); diff --git a/beacon_node/operation_pool/src/persistence.rs b/beacon_node/operation_pool/src/persistence.rs index ed15369df..92c5bd92f 100644 --- a/beacon_node/operation_pool/src/persistence.rs +++ b/beacon_node/operation_pool/src/persistence.rs @@ -142,6 +142,8 @@ impl PersistedOperationPool { attester_slashings, proposer_slashings, voluntary_exits, + // FIXME: IMPLEMENT THIS + bls_to_execution_changes: Default::default(), reward_cache: Default::default(), _phantom: Default::default(), };