@typeberry/jam 0.0.5-1ef0e31 → 0.0.5-6e657f4

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.
@@ -9559,6 +9559,7 @@ function legacyServiceNested(serviceId, hash) {
9559
9559
  ;// CONCATENATED MODULE: ./packages/jam/state/accumulation-output.ts
9560
9560
 
9561
9561
 
9562
+
9562
9563
  /**
9563
9564
  * Single service-indexed commitment to accumulation output
9564
9565
  *
@@ -9579,6 +9580,16 @@ class AccumulationOutput {
9579
9580
  this.output = output;
9580
9581
  }
9581
9582
  }
9583
+ function accumulationOutputComparator(a, b) {
9584
+ const result = a.serviceId - b.serviceId;
9585
+ if (result < 0) {
9586
+ return Ordering.Less;
9587
+ }
9588
+ if (result > 0) {
9589
+ return Ordering.Greater;
9590
+ }
9591
+ return Ordering.Equal;
9592
+ }
9582
9593
 
9583
9594
  ;// CONCATENATED MODULE: ./packages/jam/state/assurances.ts
9584
9595
 
@@ -10684,6 +10695,7 @@ class StatisticsData {
10684
10695
 
10685
10696
 
10686
10697
 
10698
+
10687
10699
 
10688
10700
  var in_memory_state_UpdateError;
10689
10701
  (function (UpdateError) {
@@ -11087,7 +11099,7 @@ class InMemoryState extends WithDebug {
11087
11099
  validatorsManager: common_tryAsServiceId(0),
11088
11100
  autoAccumulateServices: [],
11089
11101
  }),
11090
- accumulationOutputLog: [],
11102
+ accumulationOutputLog: SortedArray.fromArray(accumulationOutputComparator, []),
11091
11103
  services: new Map(),
11092
11104
  });
11093
11105
  }
@@ -11286,7 +11298,7 @@ var serialize;
11286
11298
  /** C(16): https://graypaper.fluffylabs.dev/#/38c4e62/3b46033b4603?v=0.7.0 */
11287
11299
  serialize.accumulationOutputLog = {
11288
11300
  key: stateKeys.index(StateKeyIdx.Theta),
11289
- Codec: descriptors_codec.sequenceVarLen(AccumulationOutput.Codec),
11301
+ Codec: descriptors_codec.sequenceVarLen(AccumulationOutput.Codec).convert((i) => i.array, (o) => SortedArray.fromSortedArray(accumulationOutputComparator, o)),
11290
11302
  extract: (s) => s.accumulationOutputLog,
11291
11303
  };
11292
11304
  /** C(255, s): https://graypaper.fluffylabs.dev/#/85129da/383103383103?v=0.6.3 */