From 3431801e236ecca0e08be507ad119897b5712597 Mon Sep 17 00:00:00 2001 From: Seun Lanlege Date: Sat, 22 Apr 2023 11:13:44 +0100 Subject: [PATCH] use blake2 for extrinsic hashing --- subxt/src/tx/tx_client.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subxt/src/tx/tx_client.rs b/subxt/src/tx/tx_client.rs index 0b73a964e1..58b59bc67b 100644 --- a/subxt/src/tx/tx_client.rs +++ b/subxt/src/tx/tx_client.rs @@ -6,6 +6,7 @@ use std::borrow::Cow; use codec::{Compact, Encode}; use derivative::Derivative; +use sp_core_hashing::blake2_256; use crate::{ client::{OfflineClientT, OnlineClientT}, @@ -320,7 +321,7 @@ where self.additional_and_extra_params .encode_additional_to(&mut bytes); if bytes.len() > 256 { - f(Cow::Borrowed(T::Hasher::hash_of(&Encoded(bytes)).as_ref())) + f(Cow::Borrowed(blake2_256(&bytes).as_ref())) } else { f(Cow::Owned(bytes)) }