mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 00:25:51 +00:00
Make use of StorageHasher and HasherKind (#2836)
* Make use of StorageHasher and HasherKind. * Use Storagehasher hasher function for key2 of double map. * Refactor to reuse hasher from implementation. * Bump up since there is srml changes. * Update metadata version.
This commit is contained in:
@@ -214,7 +214,13 @@ enum HasherKind {
|
||||
|
||||
impl From<&SetHasher> for HasherKind {
|
||||
fn from(set_hasher: &SetHasher) -> Self {
|
||||
match set_hasher.inner.content {
|
||||
(&set_hasher.inner.content).into()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&Hasher> for HasherKind {
|
||||
fn from(hasher: &Hasher) -> Self {
|
||||
match hasher {
|
||||
Hasher::Blake2_256(_) => HasherKind::Blake2_256,
|
||||
Hasher::Blake2_128(_) => HasherKind::Blake2_128,
|
||||
Hasher::Twox256(_) => HasherKind::Twox256,
|
||||
@@ -223,6 +229,7 @@ impl From<&SetHasher> for HasherKind {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl HasherKind {
|
||||
fn into_storage_hasher_struct(&self) -> TokenStream2 {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user