Detect RBF by mined transactions

This commit is contained in:
Mononaut committed 2023-05-18 09:51:41 -04:00
1 parent 64d6bda728
commit 369db7a63c
4 files changed
+59 -1

No files matched your search

+6
View File
@@ -332,6 +332,8 @@ class WebsocketHandler {
for (const deletedTx of deletedTransactions) {
rbfCache.evict(deletedTx.txid);
}
memPool.removeFromSpendMap(deletedTransactions);
memPool.addToSpendMap(newTransactions);
const recommendedFees = feeApi.getRecommendedFee();
// update init data
@@ -599,6 +601,10 @@ class WebsocketHandler {
}
}
const rbfTransactions = Common.findMinedRbfTransactions(transactions, memPool.getSpendMap());
memPool.handleMinedRbfTransactions(rbfTransactions);
memPool.removeFromSpendMap(transactions);
// Update mempool to remove transactions included in the new block
for (const txId of txIds) {
delete _memPool[txId];