Fix the broken weight multiplier update function (#6334)

* Initial draft, has some todos left

* remove ununsed import

* Apply suggestions from code review

* Some refactors with migration

* Fix more test and cleanup

* Fix for companion

* Apply suggestions from code review

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>

* Update bin/node/runtime/src/impls.rs

* Fix weight

* Add integrity test

* length is not affected.

Co-authored-by: Alexander Popiak <alexander.popiak@parity.io>
This commit is contained in:
Kian PaimaniandAlexander Popiak authored and GitHub committed 2020-06-17 13:20:17 +00:00
1 parent 67c9ac9393
commit 82bdf1a891
10 files changed
+458 -253

No files matched your search

+1 -1
View File
@@ -570,7 +570,7 @@ decl_module! {
/// A dispatch that will fill the block weight up to the given ratio.
// TODO: This should only be available for testing, rather than in general usage, but
// that's not possible at present (since it's within the decl_module macro).
#[weight = (*_ratio * T::MaximumBlockWeight::get(), DispatchClass::Operational)]
#[weight = *_ratio * T::MaximumBlockWeight::get()]
fn fill_block(origin, _ratio: Perbill) {
ensure_root(origin)?;
}