mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
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:
committed by
GitHub
parent
406fa981bb
commit
5a33228ea9
@@ -27,7 +27,6 @@ use sc_client_api::{
|
||||
light::{Fetcher, RemoteCallRequest, RemoteBodyRequest},
|
||||
BlockBody,
|
||||
};
|
||||
use sp_core::Hasher;
|
||||
use sp_runtime::{
|
||||
generic::BlockId, traits::{self, Block as BlockT, BlockIdTo, Header as HeaderT, Hash as HashT},
|
||||
transaction_validity::TransactionValidity,
|
||||
@@ -120,7 +119,7 @@ impl<Client, Block> sc_transaction_graph::ChainApi for FullChainApi<Client, Bloc
|
||||
|
||||
fn hash_and_length(&self, ex: &sc_transaction_graph::ExtrinsicFor<Self>) -> (Self::Hash, usize) {
|
||||
ex.using_encoded(|x| {
|
||||
(traits::HasherFor::<Block>::hash(x), x.len())
|
||||
(<traits::HashFor::<Block> as traits::Hash>::hash(x), x.len())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user