@typeberry/jam 0.1.1-127cc86 → 0.1.1-135f62f
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/importer/index.js +5 -2
- package/importer/index.js.map +1 -1
- package/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/importer/index.js
CHANGED
|
@@ -23505,11 +23505,14 @@ class DeferredTransfers {
|
|
|
23505
23505
|
async transition({ pendingTransfers, timeslot, servicesUpdate: inputServicesUpdate, entropy, }) {
|
|
23506
23506
|
// https://graypaper.fluffylabs.dev/#/7e6ff6a/187a03187a03?v=0.6.7
|
|
23507
23507
|
const transferStatistics = new Map();
|
|
23508
|
-
const services = uniquePreserveOrder(pendingTransfers.
|
|
23508
|
+
const services = uniquePreserveOrder(pendingTransfers.map((x) => x.destination));
|
|
23509
23509
|
let currentStateUpdate = AccumulationStateUpdate.new(inputServicesUpdate);
|
|
23510
23510
|
for (const serviceId of services) {
|
|
23511
23511
|
const partiallyUpdatedState = new PartiallyUpdatedState(this.state, currentStateUpdate);
|
|
23512
|
-
|
|
23512
|
+
// https://graypaper.fluffylabs.dev/#/38c4e62/18750318ae03?v=0.7.0
|
|
23513
|
+
const transfers = pendingTransfers
|
|
23514
|
+
.filter((pendingTransfer) => pendingTransfer.destination === serviceId)
|
|
23515
|
+
.toSorted((a, b) => a.source - b.source);
|
|
23513
23516
|
const info = partiallyUpdatedState.getServiceInfo(serviceId);
|
|
23514
23517
|
if (info === null) {
|
|
23515
23518
|
return result_Result.error(DeferredTransfersErrorCode.ServiceInfoNotExist);
|