mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
Add Keccak hasher (#6101)
* fix keccak hasher * Update hasher.rs Co-authored-by: Gavin Wood <i@gavwood.com>
This commit is contained in:
@@ -300,6 +300,16 @@ pub trait Trie {
|
||||
fn blake2_256_ordered_root(input: Vec<Vec<u8>>) -> H256 {
|
||||
Layout::<sp_core::Blake2Hasher>::ordered_trie_root(input)
|
||||
}
|
||||
|
||||
/// A trie root formed from the iterated items.
|
||||
fn keccak_256_root(input: Vec<(Vec<u8>, Vec<u8>)>) -> H256 {
|
||||
Layout::<sp_core::KeccakHasher>::trie_root(input)
|
||||
}
|
||||
|
||||
/// A trie root formed from the enumerated items.
|
||||
fn keccak_256_ordered_root(input: Vec<Vec<u8>>) -> H256 {
|
||||
Layout::<sp_core::KeccakHasher>::ordered_trie_root(input)
|
||||
}
|
||||
}
|
||||
|
||||
/// Interface that provides miscellaneous functions for communicating between the runtime and the node.
|
||||
|
||||
Reference in New Issue
Block a user