@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/index.js CHANGED
@@ -39965,7 +39965,8 @@ class AccumulateExternalities {
39965
39965
  }
39966
39966
  eject(destination, previousCodeHash) {
39967
39967
  const service = this.getServiceInfo(destination);
39968
- if (service === null || destination === null) {
39968
+ const isRemoved = this.updatedState.stateUpdate.services.removed.find((serviceId) => serviceId === destination) !== undefined;
39969
+ if (service === null || destination === null || isRemoved) {
39969
39970
  return result_Result.error(EjectError.InvalidService, () => "Service missing");
39970
39971
  }
39971
39972
  const currentService = this.getCurrentServiceInfo();
@@ -46099,17 +46100,19 @@ class Eject {
46099
46100
  return;
46100
46101
  }
46101
46102
  const result = this.partialState.eject(serviceId, previousCodeHash);
46102
- logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- ${result_resultToString(result)}`;
46103
46103
  // All good!
46104
46104
  if (result.isOk) {
46105
+ logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- OK`;
46105
46106
  regs.set(eject_IN_OUT_REG, HostCallResult.OK);
46106
46107
  return;
46107
46108
  }
46108
46109
  const e = result.error;
46109
46110
  if (e === EjectError.InvalidService) {
46111
+ logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- WHO ${result_resultToString(result)}`;
46110
46112
  regs.set(eject_IN_OUT_REG, HostCallResult.WHO);
46111
46113
  }
46112
46114
  else if (e === EjectError.InvalidPreimage) {
46115
+ logger_logger.trace `EJECT(${serviceId}, ${previousCodeHash}) <- HUH ${result_resultToString(result)}`;
46113
46116
  regs.set(eject_IN_OUT_REG, HostCallResult.HUH);
46114
46117
  }
46115
46118
  else {