frame: use derive-impl for beefy and mmr pallets (#1867)

Part of #171
This commit is contained in:
Adrian Catangiu
2023-10-13 11:37:48 +03:00
committed by GitHub
parent 832060000b
commit 82bfe28424
3 changed files with 13 additions and 84 deletions
@@ -19,13 +19,9 @@ use crate as pallet_mmr;
use crate::*;
use codec::{Decode, Encode};
use frame_support::{
parameter_types,
traits::{ConstU32, ConstU64},
};
use sp_core::H256;
use frame_support::{derive_impl, parameter_types};
use sp_mmr_primitives::{Compact, LeafDataProvider};
use sp_runtime::traits::{BlakeTwo256, IdentityLookup, Keccak256};
use sp_runtime::traits::Keccak256;
type Block = frame_system::mocking::MockBlock<Test>;
@@ -37,30 +33,9 @@ frame_support::construct_runtime!(
}
);
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall;
type Nonce = u64;
type Hash = H256;
type Hashing = BlakeTwo256;
type AccountId = sp_core::sr25519::Public;
type Lookup = IdentityLookup<Self::AccountId>;
type Block = Block;
type RuntimeEvent = RuntimeEvent;
type BlockHashCount = ConstU64<250>;
type DbWeight = ();
type BlockWeights = ();
type BlockLength = ();
type Version = ();
type PalletInfo = PalletInfo;
type AccountData = ();
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
type SS58Prefix = ();
type OnSetCode = ();
type MaxConsumers = ConstU32<16>;
}
impl Config for Test {