use blake2 for extrinsic hashing (#921)

This commit is contained in:
Web3 Philosopher
2023-04-24 11:01:56 +01:00
committed by GitHub
parent 7abe1fd1a6
commit 92f5417569
+2 -1
View File
@@ -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))
}