@leofcoin/workers 1.5.39 → 1.5.41

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.
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface, p as proto, a as proto$1, i as index, b as index$1, E as EasyWorker } from './worker-DMCj1e6z.js';
1
+ import { F as FormatInterface, p as proto, a as proto$1, e as encodeFrames, d as decodeFrames, E as EasyWorker } from './worker-BDTWOCzS.js';
2
2
 
3
3
  class ValidatorMessage extends FormatInterface {
4
4
  get messageName() {
@@ -33,14 +33,16 @@ class BlockMessage extends FormatInterface {
33
33
  }
34
34
  return super.encode({
35
35
  ...decoded,
36
- validators: index(validators)
36
+ validators: encodeFrames(validators)
37
37
  });
38
38
  }
39
39
  decode(encoded) {
40
40
  encoded = encoded || this.encoded;
41
41
  super.decode(encoded);
42
42
  // @ts-ignore
43
- this.decoded.validators = index$1(this.decoded.validators).map((validator) => new ValidatorMessage(validator).decoded);
43
+ // Preserve historical acceptance of padded length prefixes. Tightening
44
+ // canonical protocol validation is a separate, versioned decision.
45
+ this.decoded.validators = decodeFrames(this.decoded.validators, 0, { canonical: false }).map((validator) => new ValidatorMessage(validator).decoded);
44
46
  return this.decoded;
45
47
  }
46
48
  }
@@ -1,4 +1,4 @@
1
- import { F as FormatInterface, p as proto, a as proto$1, i as index, b as index$1, E as EasyWorker } from './worker-DMCj1e6z.js';
1
+ import { F as FormatInterface, p as proto, a as proto$1, e as encodeFrames, d as decodeFrames, E as EasyWorker } from './worker-BDTWOCzS.js';
2
2
 
3
3
  class ValidatorMessage extends FormatInterface {
4
4
  get messageName() {
@@ -33,14 +33,16 @@ class BlockMessage extends FormatInterface {
33
33
  }
34
34
  return super.encode({
35
35
  ...decoded,
36
- validators: index(validators)
36
+ validators: encodeFrames(validators)
37
37
  });
38
38
  }
39
39
  decode(encoded) {
40
40
  encoded = encoded || this.encoded;
41
41
  super.decode(encoded);
42
42
  // @ts-ignore
43
- this.decoded.validators = index$1(this.decoded.validators).map((validator) => new ValidatorMessage(validator).decoded);
43
+ // Preserve historical acceptance of padded length prefixes. Tightening
44
+ // canonical protocol validation is a separate, versioned decision.
45
+ this.decoded.validators = decodeFrames(this.decoded.validators, 0, { canonical: false }).map((validator) => new ValidatorMessage(validator).decoded);
44
46
  return this.decoded;
45
47
  }
46
48
  }