mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 13:28:33 +00:00
Delete outdated deposits handling in operation pool (#719)
This commit is contained in:
@@ -14,7 +14,6 @@ pub struct PersistedOperationPool<T: EthSpec> {
|
||||
// We could save space by not storing the attestation ID, but it might
|
||||
// be difficult to make that roundtrip due to eager aggregation.
|
||||
attestations: Vec<(AttestationId, Vec<Attestation<T>>)>,
|
||||
deposits: Vec<(u64, Deposit)>,
|
||||
/// Attester slashings.
|
||||
attester_slashings: Vec<AttesterSlashing<T>>,
|
||||
/// Proposer slashings.
|
||||
@@ -33,13 +32,6 @@ impl<T: EthSpec> PersistedOperationPool<T> {
|
||||
.map(|(att_id, att)| (att_id.clone(), att.clone()))
|
||||
.collect();
|
||||
|
||||
let deposits = operation_pool
|
||||
.deposits
|
||||
.read()
|
||||
.iter()
|
||||
.map(|(index, d)| (*index, d.clone()))
|
||||
.collect();
|
||||
|
||||
let attester_slashings = operation_pool
|
||||
.attester_slashings
|
||||
.read()
|
||||
@@ -63,7 +55,6 @@ impl<T: EthSpec> PersistedOperationPool<T> {
|
||||
|
||||
Self {
|
||||
attestations,
|
||||
deposits,
|
||||
attester_slashings,
|
||||
proposer_slashings,
|
||||
voluntary_exits,
|
||||
@@ -73,7 +64,6 @@ impl<T: EthSpec> PersistedOperationPool<T> {
|
||||
/// Reconstruct an `OperationPool`.
|
||||
pub fn into_operation_pool(self, state: &BeaconState<T>, spec: &ChainSpec) -> OperationPool<T> {
|
||||
let attestations = RwLock::new(self.attestations.into_iter().collect());
|
||||
let deposits = RwLock::new(self.deposits.into_iter().collect());
|
||||
let attester_slashings = RwLock::new(
|
||||
self.attester_slashings
|
||||
.into_iter()
|
||||
@@ -100,7 +90,6 @@ impl<T: EthSpec> PersistedOperationPool<T> {
|
||||
|
||||
OperationPool {
|
||||
attestations,
|
||||
deposits,
|
||||
attester_slashings,
|
||||
proposer_slashings,
|
||||
voluntary_exits,
|
||||
|
||||
Reference in New Issue
Block a user