mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Switch to shiny new fast, RLP-less trie (#795)
* Bump codec * Fix tests * Patricia trie builds * Introduce trie * Some yak shaving. * Some fixes * Remove RLP ref * Fixes * It builds! * Some tests fixed * Another test fix * Rejig more hashes * substrate-trie::iterator_works test * Update lock * Polish * Docs * Undo incorrect "fix" for tests * Fix nits
This commit is contained in:
committed by
Arkadiy Paronyan
parent
b02c274374
commit
82d6ca3484
@@ -252,12 +252,12 @@ pub trait Hash: 'static + MaybeSerializeDebug + Clone + Eq + PartialEq { // Stup
|
||||
Encode::using_encoded(s, Self::hash)
|
||||
}
|
||||
|
||||
/// Produce the patricia-trie root of a mapping from indices to byte slices.
|
||||
/// 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`.
|
||||
fn ordered_trie_root<
|
||||
I: IntoIterator<Item = A>,
|
||||
I: IntoIterator<Item = A> + Iterator<Item = A>,
|
||||
A: AsRef<[u8]>
|
||||
>(input: I) -> Self::Output;
|
||||
|
||||
@@ -296,7 +296,7 @@ impl Hash for BlakeTwo256 {
|
||||
runtime_io::trie_root::<Blake2Hasher, _, _, _>(input).into()
|
||||
}
|
||||
fn ordered_trie_root<
|
||||
I: IntoIterator<Item = A>,
|
||||
I: IntoIterator<Item = A> + Iterator<Item = A>,
|
||||
A: AsRef<[u8]>
|
||||
>(input: I) -> Self::Output {
|
||||
runtime_io::ordered_trie_root::<Blake2Hasher, _, _>(input).into()
|
||||
|
||||
Reference in New Issue
Block a user