mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
optimize double map first key hash (#2451)
* fix double map encoding it is now encoded as specified in the doc
This commit is contained in:
@@ -621,9 +621,11 @@ impl<'a, I: Iterator<Item=syn::Meta>> Impls<'a, I> {
|
||||
type Query = #value_type;
|
||||
|
||||
fn prefix_for(k1: &#k1ty) -> Vec<u8> {
|
||||
use #scrate::storage::hashed::generator::StorageHasher;
|
||||
|
||||
let mut key = #as_double_map::prefix().to_vec();
|
||||
#scrate::codec::Encode::encode_to(k1, &mut key);
|
||||
#scrate::Hashable::#hasher(&key).to_vec()
|
||||
#scrate::#hasher::hash(&key[..]).to_vec()
|
||||
}
|
||||
|
||||
fn prefix() -> &'static [u8] {
|
||||
|
||||
Reference in New Issue
Block a user