chore: add ChainSpec::from_genesis (#13601)

This commit is contained in:
Matthias Seitz
2024-12-30 22:52:05 +01:00
committed by GitHub
parent 41104933c1
commit 0ac4475637

View File

@ -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