Replace acceleration API polling with websocket

This commit is contained in:
Mononaut
2024-05-04 00:18:33 +00:00
parent 8ec5dd70e0
commit a29b29300e
8 changed files with 136 additions and 32 deletions

View File

@@ -404,6 +404,10 @@ class Mempool {
const newAccelerationMap: { [txid: string]: Acceleration } = {};
for (const acceleration of newAccelerations) {
// skip transactions we don't know about
if (!this.mempoolCache[acceleration.txid]) {
continue;
}
newAccelerationMap[acceleration.txid] = acceleration;
if (this.accelerations[acceleration.txid] == null) {
// new acceleration