Fix a few migration issues with 2D weights (#1755)

* Give a max proof size to DMP individual weight processing during migration

* Fix a few migration issues with 2D weights

* Update substrate

* Fixes

* cargo fmt

* Re-add v1 migration

* Set DEFAULT_POV_SIZE to 64 KB

* Use Weight::from_parts

* Update Polkadot

* Fixes
This commit is contained in:
Keith Yeung
2022-10-24 23:03:02 +08:00
committed by GitHub
parent 3d257b770d
commit b566f3b303
8 changed files with 421 additions and 365 deletions
+4 -1
View File
@@ -218,7 +218,10 @@ fn update_weight_restrict_decay_works() {
fn update_xcmp_max_individual_weight() {
new_test_ext().execute_with(|| {
let data: QueueConfigData = <QueueConfig<Test>>::get();
assert_eq!(data.xcmp_max_individual_weight, 20u64 * WEIGHT_PER_MILLIS);
assert_eq!(
data.xcmp_max_individual_weight,
Weight::from_parts(20u64 * WEIGHT_PER_MILLIS.ref_time(), DEFAULT_POV_SIZE),
);
assert_ok!(XcmpQueue::update_xcmp_max_individual_weight(
RuntimeOrigin::root(),
30u64 * WEIGHT_PER_MILLIS.ref_time()