Delete outdated deposits handling in operation pool (#719)

This commit is contained in:
pscott
2019-12-17 00:37:12 +01:00
committed by Michael Sproul
parent 34f003adb8
commit e7de1b3339
4 changed files with 297 additions and 539 deletions

View File

@@ -11,15 +11,11 @@ use beacon_chain::{
},
BlockProcessingOutcome,
};
use rand::Rng;
use state_processing::{
per_slot_processing, per_slot_processing::Error as SlotProcessingError, EpochProcessingError,
};
use store::Store;
use types::test_utils::{SeedableRng, TestRandom, XorShiftRng};
use types::{
BeaconStateError, Deposit, EthSpec, Hash256, Keypair, MinimalEthSpec, RelativeEpoch, Slot,
};
use types::{BeaconStateError, EthSpec, Hash256, Keypair, MinimalEthSpec, RelativeEpoch, Slot};
// Should ideally be divisible by 3.
pub const VALIDATOR_COUNT: usize = 24;
@@ -335,15 +331,6 @@ fn roundtrip_operation_pool() {
);
assert!(harness.chain.op_pool.num_attestations() > 0);
// Add some deposits
let rng = &mut XorShiftRng::from_seed([66; 16]);
for i in 0..rng.gen_range(1, VALIDATOR_COUNT) {
harness
.chain
.process_deposit(i as u64, Deposit::random_for_test(rng))
.unwrap();
}
// TODO: could add some other operations
harness.chain.persist().unwrap();