From 340647bece600abc8790fd78dca9439407a78a86 Mon Sep 17 00:00:00 2001 From: Daniel Shiposha Date: Thu, 19 Oct 2023 11:34:23 +0200 Subject: [PATCH] fix: enable maintenance mode during upgrade --- tests/src/proposeupgrade.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/src/proposeupgrade.ts b/tests/src/proposeupgrade.ts index a008f7ec40..54d94c8574 100644 --- a/tests/src/proposeupgrade.ts +++ b/tests/src/proposeupgrade.ts @@ -13,12 +13,16 @@ async function main() { const wasmFileHash = blake2AsHex(wasmFileBytes, 256); const authorizeUpgrade = api.tx.parachainSystem.authorizeUpgrade(wasmFileHash, true); + const enableMaintenance = api.tx.maintenance.enable(); const councilMembers = (await api.query.council.members()).toJSON() as any[]; const councilProposalThreshold = Math.floor(councilMembers.length / 2) + 1; const democracyProposal = api.tx.democracy.externalProposeDefault({ - Inline: authorizeUpgrade.method.toHex(), + Inline: api.tx.utility.batchAll([ + authorizeUpgrade.method.toHex(), + enableMaintenance.method.toHex(), + ]).method.toHex(), }); const councilProposal = api.tx.council.propose(