@typeberry/jam 0.0.4 → 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.
- package/block-generator/index.js +14 -2
- package/block-generator/index.js.map +1 -1
- package/importer/index.js +66 -24
- package/importer/index.js.map +1 -1
- package/index.js +16 -4
- package/index.js.map +1 -1
- package/jam-network/index.js +14 -2
- package/jam-network/index.js.map +1 -1
- package/package.json +1 -1
package/jam-network/index.js
CHANGED
|
@@ -32433,6 +32433,7 @@ function legacyServiceNested(serviceId, hash) {
|
|
|
32433
32433
|
;// CONCATENATED MODULE: ./packages/jam/state/accumulation-output.ts
|
|
32434
32434
|
|
|
32435
32435
|
|
|
32436
|
+
|
|
32436
32437
|
/**
|
|
32437
32438
|
* Single service-indexed commitment to accumulation output
|
|
32438
32439
|
*
|
|
@@ -32453,6 +32454,16 @@ class AccumulationOutput {
|
|
|
32453
32454
|
this.output = output;
|
|
32454
32455
|
}
|
|
32455
32456
|
}
|
|
32457
|
+
function accumulationOutputComparator(a, b) {
|
|
32458
|
+
const result = a.serviceId - b.serviceId;
|
|
32459
|
+
if (result < 0) {
|
|
32460
|
+
return Ordering.Less;
|
|
32461
|
+
}
|
|
32462
|
+
if (result > 0) {
|
|
32463
|
+
return Ordering.Greater;
|
|
32464
|
+
}
|
|
32465
|
+
return Ordering.Equal;
|
|
32466
|
+
}
|
|
32456
32467
|
|
|
32457
32468
|
;// CONCATENATED MODULE: ./packages/jam/state/assurances.ts
|
|
32458
32469
|
|
|
@@ -33558,6 +33569,7 @@ class StatisticsData {
|
|
|
33558
33569
|
|
|
33559
33570
|
|
|
33560
33571
|
|
|
33572
|
+
|
|
33561
33573
|
|
|
33562
33574
|
var in_memory_state_UpdateError;
|
|
33563
33575
|
(function (UpdateError) {
|
|
@@ -33961,7 +33973,7 @@ class InMemoryState extends WithDebug {
|
|
|
33961
33973
|
validatorsManager: tryAsServiceId(0),
|
|
33962
33974
|
autoAccumulateServices: [],
|
|
33963
33975
|
}),
|
|
33964
|
-
accumulationOutputLog: [],
|
|
33976
|
+
accumulationOutputLog: SortedArray.fromArray(accumulationOutputComparator, []),
|
|
33965
33977
|
services: new Map(),
|
|
33966
33978
|
});
|
|
33967
33979
|
}
|
|
@@ -34160,7 +34172,7 @@ var serialize_serialize;
|
|
|
34160
34172
|
/** C(16): https://graypaper.fluffylabs.dev/#/38c4e62/3b46033b4603?v=0.7.0 */
|
|
34161
34173
|
serialize.accumulationOutputLog = {
|
|
34162
34174
|
key: stateKeys.index(StateKeyIdx.Theta),
|
|
34163
|
-
Codec: descriptors_codec.sequenceVarLen(AccumulationOutput.Codec),
|
|
34175
|
+
Codec: descriptors_codec.sequenceVarLen(AccumulationOutput.Codec).convert((i) => i.array, (o) => SortedArray.fromSortedArray(accumulationOutputComparator, o)),
|
|
34164
34176
|
extract: (s) => s.accumulationOutputLog,
|
|
34165
34177
|
};
|
|
34166
34178
|
/** C(255, s): https://graypaper.fluffylabs.dev/#/85129da/383103383103?v=0.6.3 */
|