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
@@ -32,7 +32,7 @@ use std::sync::Arc;
use std::time::Duration;
use sp_runtime::{
generic::BlockId, traits::{Block as BlockT, DigestFor, NumberFor, HasherFor},
generic::BlockId, traits::{Block as BlockT, DigestFor, NumberFor, HashFor},
};
use futures::prelude::*;
pub use sp_inherents::InherentData;
@@ -93,7 +93,7 @@ pub struct Proposal<Block: BlockT, Transaction> {
/// Optional proof that was recorded while building the block.
pub proof: Option<sp_state_machine::StorageProof>,
/// The storage changes while building this block.
pub storage_changes: sp_state_machine::StorageChanges<Transaction, HasherFor<Block>, NumberFor<Block>>,
pub storage_changes: sp_state_machine::StorageChanges<Transaction, HashFor<Block>, NumberFor<Block>>,
}
/// Used as parameter to [`Proposer`] to tell the requirement on recording a proof.