Reduce usage of Blake2Hasher (#5132)

This reduces the usage of `Blake2Hasher` in the code base and replaces
it with `BlakeTwo256`. The most important change is the removal of the
custom extern function for `Blake2Hasher`. The runtime `Hash` trait is
now also simplified and directly requires that the implementing type
implements `Hashable`.
This commit is contained in:
Benjamin Kampmann
2020-03-05 08:51:03 +01:00
committed by GitHub
parent 406fa981bb
commit 5a33228ea9
64 changed files with 372 additions and 451 deletions
+3 -3
View File
@@ -33,7 +33,7 @@ pub use sp_keyring::{
ed25519::Keyring as Ed25519Keyring,
sr25519::Keyring as Sr25519Keyring,
};
pub use sp_core::{Blake2Hasher, traits::BareCryptoStorePtr};
pub use sp_core::traits::BareCryptoStorePtr;
pub use sp_runtime::{Storage, StorageChild};
pub use sp_state_machine::ExecutionStrategy;
pub use self::client_ext::{ClientExt, ClientBlockImportExt};
@@ -41,13 +41,13 @@ pub use self::client_ext::{ClientExt, ClientBlockImportExt};
use std::sync::Arc;
use std::collections::HashMap;
use sp_core::storage::{well_known_keys, ChildInfo};
use sp_runtime::traits::Block as BlockT;
use sp_runtime::traits::{Block as BlockT, BlakeTwo256};
use sc_client::LocalCallExecutor;
/// Test client light database backend.
pub type LightBackend<Block> = sc_client::light::backend::Backend<
sc_client_db::light::LightStorage<Block>,
Blake2Hasher,
BlakeTwo256,
>;
/// A genesis storage initialization trait.