mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 07:01:03 +00:00
paras: initialize_para_now and ParachainsCache (#4934)
This commit adds a new primitive called `ParachainsCache` to manipulate the `Parachains` storage entry in a more convenient way. Then, on top of that, this commit changes the logic of `initialize_para_now` so that it is identical to what is used for initialization of onboarding.
This commit is contained in:
@@ -1020,6 +1020,7 @@ fn pvf_check_coalescing_onboarding_and_upgrade() {
|
||||
|
||||
let a = ParaId::from(111);
|
||||
let b = ParaId::from(222);
|
||||
let existing_code: ValidationCode = vec![1, 2, 3].into();
|
||||
let validation_code: ValidationCode = vec![3, 2, 1].into();
|
||||
|
||||
let paras = vec![(
|
||||
@@ -1027,7 +1028,7 @@ fn pvf_check_coalescing_onboarding_and_upgrade() {
|
||||
ParaGenesisArgs {
|
||||
parachain: true,
|
||||
genesis_head: Default::default(),
|
||||
validation_code: ValidationCode(vec![]), // valid since in genesis
|
||||
validation_code: existing_code,
|
||||
},
|
||||
)];
|
||||
|
||||
@@ -1159,6 +1160,7 @@ fn pvf_check_onboarding_reject_on_expiry() {
|
||||
#[test]
|
||||
fn pvf_check_upgrade_reject() {
|
||||
let a = ParaId::from(111);
|
||||
let old_code: ValidationCode = vec![1, 2, 3].into();
|
||||
let new_code: ValidationCode = vec![3, 2, 1].into();
|
||||
|
||||
let paras = vec![(
|
||||
@@ -1166,7 +1168,7 @@ fn pvf_check_upgrade_reject() {
|
||||
ParaGenesisArgs {
|
||||
parachain: false,
|
||||
genesis_head: Default::default(),
|
||||
validation_code: ValidationCode(vec![]), // valid since in genesis
|
||||
validation_code: old_code,
|
||||
},
|
||||
)];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user