Avoid changing slasher schema for Electra

This commit is contained in:
Michael Sproul
2024-06-21 12:02:23 +10:00
parent 27ed90e4dc
commit b6913ae542
13 changed files with 178 additions and 60 deletions

View File

@@ -4,7 +4,7 @@ use logging::test_logger;
use rand::prelude::*;
use slasher::{
test_utils::{
block, indexed_att, slashed_validators_from_attestations,
block, chain_spec, indexed_att, slashed_validators_from_attestations,
slashed_validators_from_slashings, E,
},
Config, Slasher,
@@ -49,7 +49,9 @@ fn random_test(seed: u64, test_config: TestConfig) {
config.chunk_size = 1 << chunk_size_exponent;
config.history_length = 1 << rng.gen_range(chunk_size_exponent..chunk_size_exponent + 3);
let slasher = Slasher::<E>::open(config.clone(), test_logger()).unwrap();
let spec = chain_spec();
let slasher = Slasher::<E>::open(config.clone(), spec, test_logger()).unwrap();
let validators = (0..num_validators as u64).collect::<Vec<u64>>();