diff --git a/crates/chainspec/src/spec.rs b/crates/chainspec/src/spec.rs index 1e314a0e0f87..755b892d976f 100644 --- a/crates/chainspec/src/spec.rs +++ b/crates/chainspec/src/spec.rs @@ -223,6 +223,11 @@ impl Default for ChainSpec { } impl ChainSpec { + /// Converts the given [`Genesis`] into a [`ChainSpec`]. + pub fn from_genesis(genesis: Genesis) -> Self { + genesis.into() + } + /// Get information about the chain itself pub const fn chain(&self) -> Chain { self.chain