Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Guantong committed Jan 17, 2023
1 parent 3f57d73 commit 6644e25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
3 changes: 1 addition & 2 deletions modules/grandpa/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ frame_support::construct_runtime! {
}

frame_support::parameter_types! {
pub const BlockHashCount: u64 = 250;
pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024);
pub const MaximumBlockLength: u32 = 2 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::one();
Expand All @@ -64,7 +63,7 @@ impl frame_system::Config for TestRuntime {
type AccountData = ();
type AccountId = AccountId;
type BaseCallFilter = Everything;
type BlockHashCount = BlockHashCount;
type BlockHashCount = ConstU64<250>;
type BlockLength = ();
type BlockNumber = u64;
type BlockWeights = ();
Expand Down
10 changes: 3 additions & 7 deletions modules/messages/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use frame_support::{
weights::{RuntimeDbWeight, Weight},
};
use frame_system::mocking::*;
use sp_core::H256;
use sp_core::{H256, ConstU64};
use sp_runtime::{
testing::Header as SubstrateHeader,
traits::{BlakeTwo256, IdentityLookup},
Expand Down Expand Up @@ -128,7 +128,6 @@ frame_support::construct_runtime! {
}

parameter_types! {
pub const BlockHashCount: u64 = 250;
pub const MaximumBlockWeight: Weight = Weight::from_ref_time(1024);
pub const MaximumBlockLength: u32 = 2 * 1024;
pub const AvailableBlockRatio: Perbill = Perbill::one();
Expand All @@ -138,7 +137,7 @@ impl frame_system::Config for TestRuntime {
type AccountData = pallet_balances::AccountData<Balance>;
type AccountId = AccountId;
type BaseCallFilter = frame_support::traits::Everything;
type BlockHashCount = BlockHashCount;
type BlockHashCount = ConstU64<250>;
type BlockLength = ();
type BlockNumber = u64;
type BlockWeights = ();
Expand All @@ -161,14 +160,11 @@ impl frame_system::Config for TestRuntime {
type Version = ();
}

parameter_types! {
pub const ExistentialDeposit: u64 = 1;
}
impl pallet_balances::Config for TestRuntime {
type AccountStore = frame_system::Pallet<TestRuntime>;
type Balance = Balance;
type DustRemoval = ();
type ExistentialDeposit = ExistentialDeposit;
type ExistentialDeposit = ConstU64<1>;
type MaxLocks = ();
type MaxReserves = ();
type ReserveIdentifier = ();
Expand Down
7 changes: 3 additions & 4 deletions modules/parachains/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,16 @@ impl frame_system::Config for TestRuntime {
}

frame_support::parameter_types! {
pub const MaxRequests: u32 = 2;
pub const HeadersToKeep: u32 = 5;
pub const SessionLength: u64 = 5;
pub const NumValidators: u32 = 5;
pub const HeadersToKeep: u32 = 5;
}
impl pallet_bridge_grandpa::Config<pallet_bridge_grandpa::Instance1> for TestRuntime {
type BridgedChain = TestBridgedChain;
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = frame_support::traits::ConstU32<5>;
type MaxBridgedHeaderSize = frame_support::traits::ConstU32<512>;
type MaxRequests = MaxRequests;
type MaxRequests = ConstU32<2>;
type WeightInfo = ();
}

Expand All @@ -107,7 +106,7 @@ impl pallet_bridge_grandpa::Config<pallet_bridge_grandpa::Instance2> for TestRun
type HeadersToKeep = HeadersToKeep;
type MaxBridgedAuthorities = frame_support::traits::ConstU32<5>;
type MaxBridgedHeaderSize = frame_support::traits::ConstU32<512>;
type MaxRequests = MaxRequests;
type MaxRequests = ConstU32<2>;
type WeightInfo = ();
}

Expand Down

0 comments on commit 6644e25

Please sign in to comment.