mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Implement iter for doublemap (#5504)
* implement iter for doublemap * fmt * fix tests * fix staking mock * address comment * update doc and constraint for reversible hasher Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -60,7 +60,12 @@ pub trait StorageHasher: 'static {
|
||||
}
|
||||
|
||||
/// Hasher to use to hash keys to insert to storage.
|
||||
///
|
||||
/// Reversible hasher store the encoded key after the hash part.
|
||||
pub trait ReversibleStorageHasher: StorageHasher {
|
||||
/// Split the hash part out of the input.
|
||||
///
|
||||
/// I.e. for input `&[hash ++ key ++ some]` returns `&[key ++ some]`
|
||||
fn reverse(x: &[u8]) -> &[u8];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user