ef_tests: use BlsSetting in operations_deposit
This commit is contained in:
parent
9887f43047
commit
8a9f7ff32b
@ -1,4 +1,5 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
use crate::bls_setting::BlsSetting;
|
||||||
use crate::case_result::compare_beacon_state_results_without_caches;
|
use crate::case_result::compare_beacon_state_results_without_caches;
|
||||||
use serde_derive::Deserialize;
|
use serde_derive::Deserialize;
|
||||||
use state_processing::per_block_processing::process_deposits;
|
use state_processing::per_block_processing::process_deposits;
|
||||||
@ -6,8 +7,8 @@ use types::{BeaconState, Deposit, EthSpec};
|
|||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct OperationsDeposit<E: EthSpec> {
|
pub struct OperationsDeposit<E: EthSpec> {
|
||||||
pub bls_setting: Option<u8>,
|
|
||||||
pub description: String,
|
pub description: String,
|
||||||
|
pub bls_setting: Option<BlsSetting>,
|
||||||
#[serde(bound = "E: EthSpec")]
|
#[serde(bound = "E: EthSpec")]
|
||||||
pub pre: BeaconState<E>,
|
pub pre: BeaconState<E>,
|
||||||
pub deposit: Deposit,
|
pub deposit: Deposit,
|
||||||
@ -27,9 +28,8 @@ impl<E: EthSpec> Case for OperationsDeposit<E> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn result(&self, _case_index: usize) -> Result<(), Error> {
|
fn result(&self, _case_index: usize) -> Result<(), Error> {
|
||||||
if self.bls_setting == Some(cfg!(feature = "fake_crypto") as u8) {
|
self.bls_setting.unwrap_or_default().check()?;
|
||||||
return Ok(());
|
|
||||||
}
|
|
||||||
let mut state = self.pre.clone();
|
let mut state = self.pre.clone();
|
||||||
let deposit = self.deposit.clone();
|
let deposit = self.deposit.clone();
|
||||||
let mut expected = self.post.clone();
|
let mut expected = self.post.clone();
|
||||||
|
Loading…
Reference in New Issue
Block a user