mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 09:25:46 +00:00
pallet-beefy-mmr: fix when using custom hashing (#14273)
`Hash` is no longer part of `pallet_mmr::Config`, but this code would still build because it assumes we're referring to underlying `<pallet_mmr::Config as frame_system::Config>::Hash` which is not what we want when using different hashing between `frame_system` and `pallet_mmr`. Disambiguate by using correct `pallet_mmr::Config::Hashing` type. Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
@@ -47,7 +47,7 @@ use codec::{Codec, Decode, Encode};
|
||||
use scale_info::TypeInfo;
|
||||
use sp_application_crypto::RuntimeAppPublic;
|
||||
use sp_core::H256;
|
||||
use sp_runtime::traits::{Hash, NumberFor};
|
||||
use sp_runtime::traits::{Hash, Keccak256, NumberFor};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
/// Key type for BEEFY module.
|
||||
@@ -156,6 +156,8 @@ impl<AuthorityId> ValidatorSet<AuthorityId> {
|
||||
/// The index of an authority.
|
||||
pub type AuthorityIndex = u32;
|
||||
|
||||
/// The Hashing used within MMR.
|
||||
pub type MmrHashing = Keccak256;
|
||||
/// The type used to represent an MMR root hash.
|
||||
pub type MmrRootHash = H256;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user