@typeberry/jam 0.2.0-0e2cdac → 0.2.0-291a493
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap-importer.mjs +5 -2
- package/bootstrap-importer.mjs.map +1 -1
- package/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/bootstrap-importer.mjs
CHANGED
|
@@ -15225,7 +15225,8 @@ class AccumulateExternalities {
|
|
|
15225
15225
|
}
|
|
15226
15226
|
eject(destination, previousCodeHash) {
|
|
15227
15227
|
const service = this.getServiceInfo(destination);
|
|
15228
|
-
|
|
15228
|
+
const isRemoved = this.updatedState.stateUpdate.services.removed.find((serviceId) => serviceId === destination) !== undefined;
|
|
15229
|
+
if (service === null || destination === null || isRemoved) {
|
|
15229
15230
|
return Result.error(EjectError.InvalidService, () => "Service missing");
|
|
15230
15231
|
}
|
|
15231
15232
|
const currentService = this.getCurrentServiceInfo();
|
|
@@ -21361,17 +21362,19 @@ class Eject {
|
|
|
21361
21362
|
return;
|
|
21362
21363
|
}
|
|
21363
21364
|
const result = this.partialState.eject(serviceId, previousCodeHash);
|
|
21364
|
-
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- ${resultToString(result)}`;
|
|
21365
21365
|
// All good!
|
|
21366
21366
|
if (result.isOk) {
|
|
21367
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- OK`;
|
|
21367
21368
|
regs.set(eject_IN_OUT_REG, HostCallResult.OK);
|
|
21368
21369
|
return;
|
|
21369
21370
|
}
|
|
21370
21371
|
const e = result.error;
|
|
21371
21372
|
if (e === EjectError.InvalidService) {
|
|
21373
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- WHO ${resultToString(result)}`;
|
|
21372
21374
|
regs.set(eject_IN_OUT_REG, HostCallResult.WHO);
|
|
21373
21375
|
}
|
|
21374
21376
|
else if (e === EjectError.InvalidPreimage) {
|
|
21377
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- HUH ${resultToString(result)}`;
|
|
21375
21378
|
regs.set(eject_IN_OUT_REG, HostCallResult.HUH);
|
|
21376
21379
|
}
|
|
21377
21380
|
else {
|