@xyo-network/xl1-protocol-sdk 1.26.33 → 1.26.35
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/dist/neutral/index.mjs +10 -6
- package/dist/neutral/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/neutral/index.mjs
CHANGED
|
@@ -4717,12 +4717,14 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
|
|
|
4717
4717
|
pruned += pruneHashes.length;
|
|
4718
4718
|
total += batch.length;
|
|
4719
4719
|
await this.pendingBlocksArchivist.delete(pruneHashes);
|
|
4720
|
-
|
|
4721
|
-
|
|
4720
|
+
const pruneSet = new Set(pruneHashes);
|
|
4721
|
+
const lastSurvivor = batch.findLast((p) => !pruneSet.has(p._hash));
|
|
4722
|
+
cursor = lastSurvivor?._sequence ?? cursor;
|
|
4723
|
+
batch = await this.pendingBlocksArchivist.next({
|
|
4722
4724
|
limit: batchSize,
|
|
4723
4725
|
cursor,
|
|
4724
4726
|
order: "desc"
|
|
4725
|
-
})
|
|
4727
|
+
});
|
|
4726
4728
|
}
|
|
4727
4729
|
this.logger?.debug(`prunePendingBlocks completed: pruned=${pruned}, totalChecked=${total}`);
|
|
4728
4730
|
return [pruned, total];
|
|
@@ -4777,12 +4779,14 @@ var SimpleMempoolRunner = class extends AbstractCreatableProvider {
|
|
|
4777
4779
|
pruned += pruneHashes.length;
|
|
4778
4780
|
total += batch.length;
|
|
4779
4781
|
await this.pendingTransactionsArchivist.delete(pruneHashes);
|
|
4780
|
-
|
|
4781
|
-
|
|
4782
|
+
const pruneSet = new Set(pruneHashes);
|
|
4783
|
+
const lastSurvivor = batch.findLast((p) => !pruneSet.has(p._hash));
|
|
4784
|
+
cursor = lastSurvivor?._sequence ?? cursor;
|
|
4785
|
+
batch = await this.pendingTransactionsArchivist.next({
|
|
4782
4786
|
limit: batchSize,
|
|
4783
4787
|
cursor,
|
|
4784
4788
|
order: "desc"
|
|
4785
|
-
})
|
|
4789
|
+
});
|
|
4786
4790
|
}
|
|
4787
4791
|
this.logger?.debug(`prunePendingTransactions completed: pruned=${pruned}, totalChecked=${total}`);
|
|
4788
4792
|
return [pruned, total];
|