[accelerator] on-demand polling support

This commit is contained in:
Mononaut
2024-07-23 14:00:23 +00:00
parent b0db348605
commit b49a6c4cac
6 changed files with 134 additions and 27 deletions

View File

@@ -213,6 +213,15 @@ class AccelerationRepository {
this.$saveAcceleration(accelerationInfo, block, block.extras.pool.id, successfulAccelerations);
}
}
let anyConfirmed = false;
for (const acc of accelerations) {
if (blockTxs[acc.txid]) {
anyConfirmed = true;
}
}
if (anyConfirmed) {
accelerationApi.accelerationConfirmed();
}
const lastSyncedHeight = await this.$getLastSyncedHeight();
// if we've missed any blocks, let the indexer catch up from the last synced height on the next run
if (block.height === lastSyncedHeight + 1) {