Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "0.11.1"
version = "0.11.2"
edition = "2024"
rust-version = "1.88"
authors = ["init4"]
Expand Down
6 changes: 3 additions & 3 deletions crates/genesis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub static TEST_GENESIS: LazyLock<Genesis> = LazyLock::new(|| {
});

/// Environment variable for specifying the genesis JSON file path.
const GENSIS_JSON_PATH: &str = "GENSIS_JSON_PATH";
const GENESIS_JSON_PATH: &str = "GENESIS_JSON_PATH";

/// Result type for genesis operations.
pub type Result<T, E = GenesisError> = std::result::Result<T, E>;
Expand Down Expand Up @@ -122,7 +122,7 @@ impl FromEnv for GenesisSpec {
optional: true,
},
&EnvItemInfo {
var: GENSIS_JSON_PATH,
var: GENESIS_JSON_PATH,
description: "A filepath to the genesis JSON file. Required if CHAIN_NAME is not set.",
optional: true,
},
Expand All @@ -132,7 +132,7 @@ impl FromEnv for GenesisSpec {
fn from_env() -> Result<Self, FromEnvErr<Self::Error>> {
parse_env_if_present::<KnownChains>("CHAIN_NAME")
.map(Into::into)
.or_else(|_| parse_env_if_present::<PathBuf>(GENSIS_JSON_PATH).map(Into::into))
.or_else(|_| parse_env_if_present::<PathBuf>(GENESIS_JSON_PATH).map(Into::into))
}
}

Expand Down
15 changes: 15 additions & 0 deletions crates/node-config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,18 @@ mod rpc;
/// Test configuration for Signet Nodes.
#[cfg(feature = "test_utils")]
pub mod test_utils;

#[cfg(test)]
mod test {
use init4_bin_base::utils::from_env::FromEnv;

use crate::SignetNodeConfig;

#[test]
fn print_inventory() {
let inventory = SignetNodeConfig::inventory();
for config in inventory {
println!("{config:?}");
}
}
}