Reconfigure on_initialize weight. (#1838)

* Reconfigure transaction payment and on_initialize weight.

* Some tests to investigate with

* fix build

* Update runtime/common/src/lib.rs

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* undo change to multiplier.

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Kian Paimani
2020-10-27 22:05:04 +01:00
committed by GitHub
parent 1a3780aa79
commit 65106d7792
4 changed files with 83 additions and 3 deletions
+3 -3
View File
@@ -49,9 +49,9 @@ pub use impls::ToAuthor;
pub type NegativeImbalance<T> = <pallet_balances::Module<T> as Currency<<T as frame_system::Trait>::AccountId>>::NegativeImbalance;
/// We assume that an on-initialize consumes 10% of the weight on average, hence a single extrinsic
/// will not be allowed to consume more than `AvailableBlockRatio - 10%`.
pub const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_percent(10);
/// We assume that an on-initialize consumes 2.5% of the weight on average, hence a single extrinsic
/// will not be allowed to consume more than `AvailableBlockRatio - 2.5%`.
pub const AVERAGE_ON_INITIALIZE_WEIGHT: Perbill = Perbill::from_perthousand(25);
// Common constants used in all runtimes.
parameter_types! {