mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 23:01:01 +00:00
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:
@@ -67,7 +67,7 @@ use sp_core::{
|
||||
use sp_runtime::{
|
||||
generic::{BlockId, SignedBlock},
|
||||
traits::{
|
||||
Block as BlockT, BlockIdTo, HashFor, Header as HeaderT, NumberFor, One,
|
||||
Block as BlockT, BlockIdTo, HashingFor, Header as HeaderT, NumberFor, One,
|
||||
SaturatedConversion, Zero,
|
||||
},
|
||||
Digest, Justification, Justifications, StateVersion,
|
||||
@@ -1267,11 +1267,11 @@ where
|
||||
// this is a read proof, using version V0 or V1 is equivalent.
|
||||
let root = state.storage_root(std::iter::empty(), StateVersion::V0).0;
|
||||
|
||||
let (proof, count) = prove_range_read_with_child_with_size::<_, HashFor<Block>>(
|
||||
let (proof, count) = prove_range_read_with_child_with_size::<_, HashingFor<Block>>(
|
||||
state, size_limit, start_key,
|
||||
)?;
|
||||
let proof = proof
|
||||
.into_compact_proof::<HashFor<Block>>(root)
|
||||
.into_compact_proof::<HashingFor<Block>>(root)
|
||||
.map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))?;
|
||||
Ok((proof, count))
|
||||
}
|
||||
@@ -1394,16 +1394,16 @@ where
|
||||
proof: CompactProof,
|
||||
start_key: &[Vec<u8>],
|
||||
) -> sp_blockchain::Result<(KeyValueStates, usize)> {
|
||||
let mut db = sp_state_machine::MemoryDB::<HashFor<Block>>::new(&[]);
|
||||
let mut db = sp_state_machine::MemoryDB::<HashingFor<Block>>::new(&[]);
|
||||
// Compact encoding
|
||||
let _ = sp_trie::decode_compact::<sp_state_machine::LayoutV0<HashFor<Block>>, _, _>(
|
||||
let _ = sp_trie::decode_compact::<sp_state_machine::LayoutV0<HashingFor<Block>>, _, _>(
|
||||
&mut db,
|
||||
proof.iter_compact_encoded_nodes(),
|
||||
Some(&root),
|
||||
)
|
||||
.map_err(|e| sp_blockchain::Error::from_state(Box::new(e)))?;
|
||||
let proving_backend = sp_state_machine::TrieBackendBuilder::new(db, root).build();
|
||||
let state = read_range_proof_check_with_child_on_proving_backend::<HashFor<Block>>(
|
||||
let state = read_range_proof_check_with_child_on_proving_backend::<HashingFor<Block>>(
|
||||
&proving_backend,
|
||||
start_key,
|
||||
)?;
|
||||
|
||||
Reference in New Issue
Block a user