update RBF timeline over websocket

This commit is contained in:
Mononaut
2022-12-14 08:49:35 -06:00
parent 1b843da785
commit 7b2a1cfd10
6 changed files with 110 additions and 53 deletions

View File

@@ -278,6 +278,7 @@ class WebsocketHandler {
const rbfTransactions = Common.findRbfTransactions(newTransactions, deletedTransactions);
const da = difficultyAdjustment.getDifficultyAdjustment();
memPool.handleRbfTransactions(rbfTransactions);
const rbfChanges = rbfCache.getRbfChanges();
const recommendedFees = feeApi.getRecommendedFee();
this.wss.clients.forEach(async (client) => {
@@ -410,6 +411,11 @@ class WebsocketHandler {
}
}
}
const rbfChange = rbfChanges.map[client['track-tx']];
if (rbfChange) {
response['rbfInfo'] = rbfChanges.chains[rbfChange];
}
}
if (client['track-mempool-block'] >= 0) {