change HashFor to HashingFor (#14483)

* change HashFor to HashingFor

* fmt

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: command-bot <>
This commit is contained in:
Marijn Schouten
2023-07-25 18:24:14 +02:00
committed by GitHub
parent 00787a10e9
commit c9b54e10ff
26 changed files with 180 additions and 161 deletions
+4 -4
View File
@@ -35,7 +35,7 @@ use sp_blockchain::{ApplyExtrinsicFailed, Error};
use sp_core::traits::CallContext;
use sp_runtime::{
legacy,
traits::{Block as BlockT, Hash, HashFor, Header as HeaderT, NumberFor, One},
traits::{Block as BlockT, Hash, HashingFor, Header as HeaderT, NumberFor, One},
Digest,
};
@@ -85,7 +85,7 @@ impl From<bool> for RecordProof {
/// backend to get the state of the block. Furthermore an optional `proof` is included which
/// can be used to proof that the build block contains the expected data. The `proof` will
/// only be set when proof recording was activated.
pub struct BuiltBlock<Block: BlockT, StateBackend: backend::StateBackend<HashFor<Block>>> {
pub struct BuiltBlock<Block: BlockT, StateBackend: backend::StateBackend<HashingFor<Block>>> {
/// The actual block that was build.
pub block: Block,
/// The changes that need to be applied to the backend to get the state of the build block.
@@ -94,7 +94,7 @@ pub struct BuiltBlock<Block: BlockT, StateBackend: backend::StateBackend<HashFor
pub proof: Option<StorageProof>,
}
impl<Block: BlockT, StateBackend: backend::StateBackend<HashFor<Block>>>
impl<Block: BlockT, StateBackend: backend::StateBackend<HashingFor<Block>>>
BuiltBlock<Block, StateBackend>
{
/// Convert into the inner values.
@@ -236,7 +236,7 @@ where
debug_assert_eq!(
header.extrinsics_root().clone(),
HashFor::<Block>::ordered_trie_root(
HashingFor::<Block>::ordered_trie_root(
self.extrinsics.iter().map(Encode::encode).collect(),
sp_runtime::StateVersion::V0,
),