mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-16 12:28:24 +00:00
Remove dupe info between ChainSpec and EthSpec
This commit is contained in:
@@ -29,9 +29,9 @@ impl<E: EthSpec> Case for EpochProcessingCrosslinks<E> {
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
// Processing requires the epoch cache.
|
||||
state.build_all_caches(&E::spec()).unwrap();
|
||||
state.build_all_caches(&E::default_spec()).unwrap();
|
||||
|
||||
let mut result = process_crosslinks(&mut state, &E::spec()).map(|_| state);
|
||||
let mut result = process_crosslinks(&mut state, &E::default_spec()).map(|_| state);
|
||||
|
||||
compare_beacon_state_results_without_caches(&mut result, &mut expected)
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ impl<E: EthSpec> Case for EpochProcessingRegistryUpdates<E> {
|
||||
fn result(&self, _case_index: usize) -> Result<(), Error> {
|
||||
let mut state = self.pre.clone();
|
||||
let mut expected = self.post.clone();
|
||||
let spec = &E::spec();
|
||||
let spec = &E::default_spec();
|
||||
|
||||
// Processing requires the epoch cache.
|
||||
state.build_all_caches(spec).unwrap();
|
||||
|
||||
@@ -31,9 +31,10 @@ impl<E: EthSpec> Case for OperationsAttesterSlashing<E> {
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
// Processing requires the epoch cache.
|
||||
state.build_all_caches(&E::spec()).unwrap();
|
||||
state.build_all_caches(&E::default_spec()).unwrap();
|
||||
|
||||
let result = process_attester_slashings(&mut state, &[attester_slashing], &E::spec());
|
||||
let result =
|
||||
process_attester_slashings(&mut state, &[attester_slashing], &E::default_spec());
|
||||
|
||||
let mut result = result.and_then(|_| Ok(state));
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ impl<E: EthSpec> Case for OperationsDeposit<E> {
|
||||
let deposit = self.deposit.clone();
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
let result = process_deposits(&mut state, &[deposit], &E::spec());
|
||||
let result = process_deposits(&mut state, &[deposit], &E::default_spec());
|
||||
|
||||
let mut result = result.and_then(|_| Ok(state));
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ impl<E: EthSpec> Case for OperationsExit<E> {
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
// Exit processing requires the epoch cache.
|
||||
state.build_all_caches(&E::spec()).unwrap();
|
||||
state.build_all_caches(&E::default_spec()).unwrap();
|
||||
|
||||
let result = process_exits(&mut state, &[exit], &E::spec());
|
||||
let result = process_exits(&mut state, &[exit], &E::default_spec());
|
||||
|
||||
let mut result = result.and_then(|_| Ok(state));
|
||||
|
||||
|
||||
@@ -31,9 +31,10 @@ impl<E: EthSpec> Case for OperationsProposerSlashing<E> {
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
// Processing requires the epoch cache.
|
||||
state.build_all_caches(&E::spec()).unwrap();
|
||||
state.build_all_caches(&E::default_spec()).unwrap();
|
||||
|
||||
let result = process_proposer_slashings(&mut state, &[proposer_slashing], &E::spec());
|
||||
let result =
|
||||
process_proposer_slashings(&mut state, &[proposer_slashing], &E::default_spec());
|
||||
|
||||
let mut result = result.and_then(|_| Ok(state));
|
||||
|
||||
|
||||
@@ -31,9 +31,9 @@ impl<E: EthSpec> Case for OperationsTransfer<E> {
|
||||
let mut expected = self.post.clone();
|
||||
|
||||
// Transfer processing requires the epoch cache.
|
||||
state.build_all_caches(&E::spec()).unwrap();
|
||||
state.build_all_caches(&E::default_spec()).unwrap();
|
||||
|
||||
let mut spec = E::spec();
|
||||
let mut spec = E::default_spec();
|
||||
spec.max_transfers = 1;
|
||||
|
||||
let result = process_transfers(&mut state, &[transfer], &spec);
|
||||
|
||||
@@ -24,7 +24,7 @@ impl<T: EthSpec> Case for Shuffling<T> {
|
||||
if self.count == 0 {
|
||||
compare_result::<_, Error>(&Ok(vec![]), &Some(self.shuffled.clone()))?;
|
||||
} else {
|
||||
let spec = T::spec();
|
||||
let spec = T::default_spec();
|
||||
let seed = hex::decode(&self.seed[2..])
|
||||
.map_err(|e| Error::FailedToParseTest(format!("{:?}", e)))?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user