mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +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
@@ -16,12 +16,12 @@
|
||||
|
||||
//! Polkadot Blake2b Hasher implementation
|
||||
|
||||
use hashdb::Hasher;
|
||||
use plain_hasher::PlainHasher;
|
||||
use hash_db::Hasher;
|
||||
use hash256_std_hasher::Hash256StdHasher;
|
||||
use hash::H256;
|
||||
|
||||
pub mod blake2 {
|
||||
use super::{Hasher, PlainHasher, H256};
|
||||
use super::{Hasher, Hash256StdHasher, H256};
|
||||
#[cfg(feature = "std")]
|
||||
use hashing::blake2_256;
|
||||
|
||||
@@ -44,7 +44,7 @@ pub mod blake2 {
|
||||
|
||||
impl Hasher for Blake2Hasher {
|
||||
type Out = H256;
|
||||
type StdHasher = PlainHasher;
|
||||
type StdHasher = Hash256StdHasher;
|
||||
const LENGTH: usize = 32;
|
||||
fn hash(x: &[u8]) -> Self::Out {
|
||||
blake2_256(x).into()
|
||||
|
||||
Reference in New Issue
Block a user