Skip to content

Commit

Permalink
Rename Config -> GenesisConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
james-chf committed Oct 24, 2022
1 parent 11972f6 commit 65c80a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions apps/src/lib/config/ethereum_bridge/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Default for MinimumConfirmations {

/// Represents chain parameters for the Ethereum bridge.
#[derive(Clone, Debug, Eq, PartialEq, Deserialize, Serialize)]
pub struct Config {
pub struct GenesisConfig {
/// Minimum number of confirmations needed to trust an Ethereum branch.
/// This must be at least one.
pub min_confirmations: MinimumConfirmations,
Expand Down Expand Up @@ -84,7 +84,7 @@ mod tests {
/// in any of the config structs.
#[test]
fn test_round_trip_toml_serde() -> Result<()> {
let config = Config {
let config = GenesisConfig {
min_confirmations: MinimumConfirmations::default(),
contracts: Contracts {
native_erc20: Address(
Expand All @@ -107,7 +107,7 @@ mod tests {
},
};
let serialized = toml::to_string(&config)?;
let deserialized: Config = toml::from_str(&serialized)?;
let deserialized: GenesisConfig = toml::from_str(&serialized)?;

assert_eq!(config, deserialized);
Ok(())
Expand Down
3 changes: 2 additions & 1 deletion apps/src/lib/config/genesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ pub mod genesis_config {
// Treasury parameters
pub treasury_params: TreasuryParamasConfig,
// Ethereum bridge config
pub ethereum_bridge_params: Option<ethereum_bridge::params::Config>,
pub ethereum_bridge_params:
Option<ethereum_bridge::params::GenesisConfig>,
// Wasm definitions
pub wasm: HashMap<String, WasmConfig>,
}
Expand Down

0 comments on commit 65c80a6

Please sign in to comment.