difftreelog
Add some logs about migration
in: master
1 file changed
tests/src/util/frankenstein.tsdiffbeforeafterboth247 }247 }248248249 const migration = migrations[process.env.DESTINATION_SPEC_VERSION!];249 const migration = migrations[process.env.DESTINATION_SPEC_VERSION!];250 console.log('⭐️⭐️⭐️ DESTINATION_SPEC_VERSION ⭐️⭐️⭐️', process.env.DESTINATION_SPEC_VERSION!);250 for(const paraId in network.paras) {251 for(const paraId in network.paras) {251 console.log(`\n--- Upgrading the runtime of parachain ${paraId} \t---`);252 console.log(`\n--- Upgrading the runtime of parachain ${paraId} \t---`);252 const para = network.paras[paraId];253 const para = network.paras[paraId];253254254 // Enable maintenance mode if present255 // Enable maintenance mode if present255 await toggleMaintenanceMode(true, para.nodes[0].wsUri);256 await toggleMaintenanceMode(true, para.nodes[0].wsUri);256 if(migration) await migration.before();257 if(migration) {258 console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');259 console.log('⭐️⭐️⭐️ Running pre-upgrade scripts... ⭐️⭐️⭐️');260 console.log('⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️');261 await migration.before();262 }257263258 // Read the WASM code and authorize the upgrade with its hash and set it as the new runtime264 // Read the WASM code and authorize the upgrade with its hash and set it as the new runtime259 const code = fs.readFileSync(NEW_PARA_WASM);265 const code = fs.readFileSync(NEW_PARA_WASM);328 // Disable maintenance mode if present334 // Disable maintenance mode if present329 for(const paraId in network.paras) {335 for(const paraId in network.paras) {330 // TODO only if our parachain336 // TODO only if our parachain331 if(migration) await migration.after();337 if(migration) {338 console.log('⭐️⭐️⭐️ Running post-upgrade scripts... ⭐️⭐️⭐️');339 await migration.after();340 }332 await toggleMaintenanceMode(false, network.paras[paraId].nodes[0].wsUri);341 await toggleMaintenanceMode(false, network.paras[paraId].nodes[0].wsUri);333 }342 }334 } else {343 } else {