Metadata V16: Be more dynamic over which hasher is used. (#1974)

* Use DynamicHasher256 to support Blake2 or Keccack depending on chain

* remove Config::Hash associated type, replace with HashFor<Config> alias

* Fix doc links

* fix wasm tests

* Don't strip system pallet associated types. check System.Hashing, not Hash. Rename BlockHash trait to Hash

* Tweak comment

* fmt

* fix merge

* Fix typo
This commit is contained in:
James Wilson
2025-04-23 10:12:48 +01:00
committed by GitHub
parent a8ae55a61b
commit 21b3f52191
43 changed files with 573 additions and 371 deletions
+5 -2
View File
@@ -4,7 +4,10 @@
//! A couple of client types that we use elsewhere.
use crate::{config::Config, metadata::Metadata};
use crate::{
config::{Config, HashFor},
metadata::Metadata,
};
use derive_where::derive_where;
/// This provides access to some relevant client state in transaction extensions,
@@ -12,7 +15,7 @@ use derive_where::derive_where;
#[derive_where(Clone, Debug)]
pub struct ClientState<C: Config> {
/// Genesis hash.
pub genesis_hash: C::Hash,
pub genesis_hash: HashFor<C>,
/// Runtime version.
pub runtime_version: RuntimeVersion,
/// Metadata.