mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 21:41:12 +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:
@@ -636,8 +636,10 @@ impl<'a, I: Iterator<Item=syn::Meta>> Impls<'a, I> {
|
||||
}
|
||||
|
||||
fn key_for(k1: &#k1ty, k2: &#k2ty) -> Vec<u8> {
|
||||
use #scrate::storage::hashed::generator::StorageHasher;
|
||||
|
||||
let mut key = #as_double_map::prefix_for(k1);
|
||||
key.extend(&#scrate::Hashable::#k2_hasher(k2));
|
||||
#scrate::codec::Encode::using_encoded(k2, |e| key.extend(&#scrate::#k2_hasher::hash(e)));
|
||||
key
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user