@typeberry/convert 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/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -18266,7 +18266,8 @@ class accumulate_externalities_AccumulateExternalities {
|
|
|
18266
18266
|
}
|
|
18267
18267
|
eject(destination, previousCodeHash) {
|
|
18268
18268
|
const service = this.getServiceInfo(destination);
|
|
18269
|
-
|
|
18269
|
+
const isRemoved = this.updatedState.stateUpdate.services.removed.find((serviceId) => serviceId === destination) !== undefined;
|
|
18270
|
+
if (service === null || destination === null || isRemoved) {
|
|
18270
18271
|
return Result.error(EjectError.InvalidService, () => "Service missing");
|
|
18271
18272
|
}
|
|
18272
18273
|
const currentService = this.getCurrentServiceInfo();
|
|
@@ -23584,17 +23585,19 @@ class Eject {
|
|
|
23584
23585
|
return;
|
|
23585
23586
|
}
|
|
23586
23587
|
const result = this.partialState.eject(serviceId, previousCodeHash);
|
|
23587
|
-
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- ${result_resultToString(result)}`;
|
|
23588
23588
|
// All good!
|
|
23589
23589
|
if (result.isOk) {
|
|
23590
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- OK`;
|
|
23590
23591
|
regs.set(eject_IN_OUT_REG, results_HostCallResult.OK);
|
|
23591
23592
|
return;
|
|
23592
23593
|
}
|
|
23593
23594
|
const e = result.error;
|
|
23594
23595
|
if (e === partial_state_EjectError.InvalidService) {
|
|
23596
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- WHO ${result_resultToString(result)}`;
|
|
23595
23597
|
regs.set(eject_IN_OUT_REG, results_HostCallResult.WHO);
|
|
23596
23598
|
}
|
|
23597
23599
|
else if (e === partial_state_EjectError.InvalidPreimage) {
|
|
23600
|
+
logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- HUH ${result_resultToString(result)}`;
|
|
23598
23601
|
regs.set(eject_IN_OUT_REG, results_HostCallResult.HUH);
|
|
23599
23602
|
}
|
|
23600
23603
|
else {
|