Skip to content

Commit

Permalink
add EvmParams to Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Oct 26, 2021
1 parent c2b0ec2 commit 51b2a87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions chain-impl-mockchain/src/setting.rs
Expand Up @@ -45,7 +45,7 @@ pub struct Settings {
pub committees: Arc<[CommitteeId]>,
pub transaction_max_expiry_epochs: u8,
#[cfg(feature = "evm")]
pub evm_config_params: EvmConfigParams,
pub evm_params: EvmConfigParams,
}

#[derive(Clone, Debug, Eq, PartialEq)]
Expand Down Expand Up @@ -134,7 +134,7 @@ impl Settings {
committees: Arc::new([]),
transaction_max_expiry_epochs: 1,
#[cfg(feature = "evm")]
evm_config_params: EvmConfigParams::default(),
evm_params: EvmConfigParams::default(),
}
}

Expand Down Expand Up @@ -246,8 +246,8 @@ impl Settings {
new_state.transaction_max_expiry_epochs = *max_expiry_epochs;
}
#[cfg(feature = "evm")]
ConfigParam::EvmParams(_config_params) => {
todo!("add config params to settings struct");
ConfigParam::EvmParams(evm_config_params) => {
new_state.evm_params = evm_config_params.clone();
}
}
}
Expand Down Expand Up @@ -293,6 +293,8 @@ impl Settings {
Some(p) => params.push(ConfigParam::TreasuryParams(*p)),
None => (),
};
#[cfg(feature = "evm")]
params.push(ConfigParam::EvmParams(self.evm_params.clone()));

debug_assert_eq!(self, &Settings::new().apply(&params).unwrap());

Expand Down

0 comments on commit 51b2a87

Please sign in to comment.