mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 15:37:56 +00:00
This commit is contained in:
@@ -466,12 +466,9 @@ pub trait Hash: 'static + MaybeSerializeDebug + Clone + Eq + PartialEq { // Stup
|
||||
Encode::using_encoded(s, Self::hash)
|
||||
}
|
||||
|
||||
/// Produce the trie-db root of a mapping from indices to byte slices.
|
||||
fn enumerated_trie_root(items: &[&[u8]]) -> Self::Output;
|
||||
|
||||
/// Iterator-based version of `enumerated_trie_root`.
|
||||
/// Iterator-based version of `ordered_trie_root`.
|
||||
fn ordered_trie_root<
|
||||
I: IntoIterator<Item = A> + Iterator<Item = A>,
|
||||
I: IntoIterator<Item = A>,
|
||||
A: AsRef<[u8]>
|
||||
>(input: I) -> Self::Output;
|
||||
|
||||
@@ -500,9 +497,6 @@ impl Hash for BlakeTwo256 {
|
||||
fn hash(s: &[u8]) -> Self::Output {
|
||||
runtime_io::blake2_256(s).into()
|
||||
}
|
||||
fn enumerated_trie_root(items: &[&[u8]]) -> Self::Output {
|
||||
runtime_io::enumerated_trie_root::<Blake2Hasher>(items).into()
|
||||
}
|
||||
fn trie_root<
|
||||
I: IntoIterator<Item = (A, B)>,
|
||||
A: AsRef<[u8]> + Ord,
|
||||
@@ -511,7 +505,7 @@ impl Hash for BlakeTwo256 {
|
||||
runtime_io::trie_root::<Blake2Hasher, _, _, _>(input).into()
|
||||
}
|
||||
fn ordered_trie_root<
|
||||
I: IntoIterator<Item = A> + Iterator<Item = A>,
|
||||
I: IntoIterator<Item = A>,
|
||||
A: AsRef<[u8]>
|
||||
>(input: I) -> Self::Output {
|
||||
runtime_io::ordered_trie_root::<Blake2Hasher, _, _>(input).into()
|
||||
|
||||
Reference in New Issue
Block a user