mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +00:00
Add a trie_root_hash variant for chain specs genesis (#10140)
* Add a `hash` variant for chain specs * Add doc * Rename to TrieRootHash * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Rustfmt * More cargo fmt I guess * Ok I have to use nightly cargo fmt Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -119,6 +119,10 @@ impl<G: RuntimeGenesis, E> BuildStorage for ChainSpec<G, E> {
|
||||
})
|
||||
.collect(),
|
||||
}),
|
||||
// The `StateRootHash` variant exists as a way to keep note that other clients support
|
||||
// it, but Substrate itself isn't capable of loading chain specs with just a hash at the
|
||||
// moment.
|
||||
Genesis::StateRootHash(_) => Err("Genesis storage in hash format not supported".into()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +148,8 @@ pub struct RawGenesis {
|
||||
enum Genesis<G> {
|
||||
Runtime(G),
|
||||
Raw(RawGenesis),
|
||||
/// State root hash of the genesis storage.
|
||||
StateRootHash(StorageData),
|
||||
}
|
||||
|
||||
/// A configuration of a client. Does not include runtime storage initialization.
|
||||
|
||||
Reference in New Issue
Block a user