@@ -25,7 +25,7 @@ use parking_lot::RwLock;
2525use sp_consensus:: BlockOrigin ;
2626use sp_core:: offchain:: OffchainStorage ;
2727use sp_runtime:: {
28- traits:: { Block as BlockT , HashFor , NumberFor } ,
28+ traits:: { Block as BlockT , HashingFor , NumberFor } ,
2929 Justification , Justifications , StateVersion , Storage ,
3030} ;
3131use sp_state_machine:: {
@@ -42,7 +42,7 @@ pub use sp_state_machine::{Backend as StateBackend, KeyValueStates};
4242pub type StateBackendFor < B , Block > = <B as Backend < Block > >:: State ;
4343
4444/// Extracts the transaction for the given state backend.
45- pub type TransactionForSB < B , Block > = <B as StateBackend < HashFor < Block > > >:: Transaction ;
45+ pub type TransactionForSB < B , Block > = <B as StateBackend < HashingFor < Block > > >:: Transaction ;
4646
4747/// Extracts the transaction for the given backend.
4848pub type TransactionFor < B , Block > = TransactionForSB < StateBackendFor < B , Block > , Block > ;
@@ -161,7 +161,7 @@ impl NewBlockState {
161161/// Keeps hold if the inserted block state and data.
162162pub trait BlockImportOperation < Block : BlockT > {
163163 /// Associated state backend type.
164- type State : StateBackend < HashFor < Block > > ;
164+ type State : StateBackend < HashingFor < Block > > ;
165165
166166 /// Returns pending state.
167167 ///
@@ -315,16 +315,16 @@ pub trait AuxStore {
315315/// An `Iterator` that iterates keys in a given block under a prefix.
316316pub struct KeysIter < State , Block >
317317where
318- State : StateBackend < HashFor < Block > > ,
318+ State : StateBackend < HashingFor < Block > > ,
319319 Block : BlockT ,
320320{
321- inner : <State as StateBackend < HashFor < Block > > >:: RawIter ,
321+ inner : <State as StateBackend < HashingFor < Block > > >:: RawIter ,
322322 state : State ,
323323}
324324
325325impl < State , Block > KeysIter < State , Block >
326326where
327- State : StateBackend < HashFor < Block > > ,
327+ State : StateBackend < HashingFor < Block > > ,
328328 Block : BlockT ,
329329{
330330 /// Create a new iterator over storage keys.
@@ -361,7 +361,7 @@ where
361361impl < State , Block > Iterator for KeysIter < State , Block >
362362where
363363 Block : BlockT ,
364- State : StateBackend < HashFor < Block > > ,
364+ State : StateBackend < HashingFor < Block > > ,
365365{
366366 type Item = StorageKey ;
367367
@@ -373,17 +373,17 @@ where
373373/// An `Iterator` that iterates keys and values in a given block under a prefix.
374374pub struct PairsIter < State , Block >
375375where
376- State : StateBackend < HashFor < Block > > ,
376+ State : StateBackend < HashingFor < Block > > ,
377377 Block : BlockT ,
378378{
379- inner : <State as StateBackend < HashFor < Block > > >:: RawIter ,
379+ inner : <State as StateBackend < HashingFor < Block > > >:: RawIter ,
380380 state : State ,
381381}
382382
383383impl < State , Block > Iterator for PairsIter < State , Block >
384384where
385385 Block : BlockT ,
386- State : StateBackend < HashFor < Block > > ,
386+ State : StateBackend < HashingFor < Block > > ,
387387{
388388 type Item = ( StorageKey , StorageData ) ;
389389
@@ -397,7 +397,7 @@ where
397397
398398impl < State , Block > PairsIter < State , Block >
399399where
400- State : StateBackend < HashFor < Block > > ,
400+ State : StateBackend < HashingFor < Block > > ,
401401 Block : BlockT ,
402402{
403403 /// Create a new iterator over storage key and value pairs.
@@ -506,11 +506,11 @@ pub trait Backend<Block: BlockT>: AuxStore + Send + Sync {
506506 /// Associated blockchain backend type.
507507 type Blockchain : BlockchainBackend < Block > ;
508508 /// Associated state backend type.
509- type State : StateBackend < HashFor < Block > >
509+ type State : StateBackend < HashingFor < Block > >
510510 + Send
511511 + AsTrieBackend <
512- HashFor < Block > ,
513- TrieBackendStorage = <Self :: State as StateBackend < HashFor < Block > > >:: TrieBackendStorage ,
512+ HashingFor < Block > ,
513+ TrieBackendStorage = <Self :: State as StateBackend < HashingFor < Block > > >:: TrieBackendStorage ,
514514 > ;
515515 /// Offchain workers local storage.
516516 type OffchainStorage : OffchainStorage ;
0 commit comments