mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 14:41:11 +00:00
refactor: define trait HashOutput for some Hash associate type (#14220)
* define trait `HashOutput` * improve * improve * Update primitives/runtime/src/traits.rs Co-authored-by: Bastian Köcher <git@kchr.de> * remove `Block::Hash: Ord` * fmt * add `MaybeFromStr` * cleanup * fix * remove useless `HashOutput` --------- Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
@@ -423,10 +423,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for BenchmarkingState<B> {
|
||||
&self,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, Self::Transaction) {
|
||||
self.state
|
||||
.borrow()
|
||||
.as_ref()
|
||||
@@ -438,10 +435,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for BenchmarkingState<B> {
|
||||
child_info: &ChildInfo,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, bool, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, bool, Self::Transaction) {
|
||||
self.state
|
||||
.borrow()
|
||||
.as_ref()
|
||||
|
||||
@@ -243,10 +243,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for RefTrackingState<B> {
|
||||
&self,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, Self::Transaction) {
|
||||
self.state.storage_root(delta, state_version)
|
||||
}
|
||||
|
||||
@@ -255,10 +252,7 @@ impl<B: BlockT> StateBackend<HashFor<B>> for RefTrackingState<B> {
|
||||
child_info: &ChildInfo,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, bool, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, bool, Self::Transaction) {
|
||||
self.state.child_storage_root(child_info, delta, state_version)
|
||||
}
|
||||
|
||||
|
||||
@@ -171,10 +171,7 @@ impl<S: StateBackend<HashFor<B>>, B: BlockT> StateBackend<HashFor<B>> for Record
|
||||
&self,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, Self::Transaction) {
|
||||
self.state.storage_root(delta, state_version)
|
||||
}
|
||||
|
||||
@@ -183,10 +180,7 @@ impl<S: StateBackend<HashFor<B>>, B: BlockT> StateBackend<HashFor<B>> for Record
|
||||
child_info: &ChildInfo,
|
||||
delta: impl Iterator<Item = (&'a [u8], Option<&'a [u8]>)>,
|
||||
state_version: StateVersion,
|
||||
) -> (B::Hash, bool, Self::Transaction)
|
||||
where
|
||||
B::Hash: Ord,
|
||||
{
|
||||
) -> (B::Hash, bool, Self::Transaction) {
|
||||
self.state.child_storage_root(child_info, delta, state_version)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user