Sort out the module index (ty @ascjones)

Sort out the RefCount type (ty @dvc94ch)
Random tweaks to make test-node more similar to the vanilla node-template
This commit is contained in:
David Palm
2020-09-24 11:48:13 +02:00
parent 9f0d358b44
commit a0f430c6ac
5 changed files with 16 additions and 9 deletions
+8 -3
View File
@@ -169,18 +169,22 @@ pub fn native_version() -> NativeVersion {
}
}
const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
parameter_types! {
pub const BlockHashCount: BlockNumber = 2400;
/// We allow for 2 seconds of compute with a 6 second average block time.
pub const MaximumBlockWeight: Weight = 2 * WEIGHT_PER_SECOND;
pub const AvailableBlockRatio: Perbill = Perbill::from_percent(75);
/// Assume 10% of weight for average on_initialize calls.
pub MaximumExtrinsicWeight: Weight = AvailableBlockRatio::get()
.saturating_sub(Perbill::from_percent(10)) * MaximumBlockWeight::get();
/// Assume 10% of weight for average on_initialize calls.
pub MaximumExtrinsicWeight: Weight =
AvailableBlockRatio::get().saturating_sub(AVERAGE_ON_INITIALIZE_WEIGHT)
* MaximumBlockWeight::get();
pub const MaximumBlockLength: u32 = 5 * 1024 * 1024;
pub const Version: RuntimeVersion = VERSION;
}
// const_assert!(AvailableBlockRatio::get().deconstruct() >= AVERAGE_ON_INITIALIZE_WEIGHT.deconstruct());
impl frame_system::Trait for Runtime {
/// The basic call filter to use in dispatchable.
type BaseCallFilter = ();
@@ -234,6 +238,7 @@ impl frame_system::Trait for Runtime {
type AccountData = pallet_balances::AccountData<Balance>;
/// Weight information for the extrinsics of this pallet.
type SystemWeightInfo = ();
// type SystemWeightInfo = weights::frame_system::WeightInfo;
/// Provides information about the pallet setup in the runtime.
type PalletInfo = PalletInfo;
}