Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kitchensink: Fix pallet_mmr config #2919

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion substrate/bin/node/cli/tests/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn blocks() -> ((Vec<u8>, Hash), (Vec<u8>, Hash)) {

// session change => consensus authorities change => authorities change digest item appears
let digest = Header::decode(&mut &block2.0[..]).unwrap().digest;
assert_eq!(digest.logs().len(), 1 /* Just babe slot */);
assert_eq!(digest.logs().len(), 2 /* Just babe and BEEFY slots */);

(block1, block2)
}
Expand Down
6 changes: 3 additions & 3 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ parameter_types! {
pub const MaxPointsToBalance: u8 = 10;
}

use sp_runtime::traits::Convert;
use sp_runtime::traits::{Convert, Keccak256};
pub struct BalanceToU256;
impl Convert<Balance, sp_core::U256> for BalanceToU256 {
fn convert(balance: Balance) -> sp_core::U256 {
Expand Down Expand Up @@ -1578,9 +1578,9 @@ impl pallet_vesting::Config for Runtime {

impl pallet_mmr::Config for Runtime {
const INDEXING_PREFIX: &'static [u8] = b"mmr";
type Hashing = <Runtime as frame_system::Config>::Hashing;
type Hashing = Keccak256;
type LeafData = pallet_mmr::ParentNumberAndHash<Self>;
type OnNewRoot = ();
type OnNewRoot = pallet_beefy_mmr::DepositBeefyDigest<Runtime>;
type WeightInfo = ();
}

Expand Down