Merge pull request #3785 from mempool/mononaut/mined-block-rbf

Detect RBF by mined transactions
This commit is contained in:
softsimon authored and GitHub committed 2023-05-30 14:50:07 +07:00
commit bdfa67e670
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
@@ -600,6 +602,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];