add missing rbf eviction
This commit is contained in:
parent
d322c6b5b5
commit
3d0f7d6855
@ -163,7 +163,7 @@ class RbfCache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// flag a transaction as removed from the mempool
|
// flag a transaction as removed from the mempool
|
||||||
public evict(txid, fast: boolean = false): void {
|
public evict(txid: string, fast: boolean = false): void {
|
||||||
if (this.txs.has(txid) && (fast || !this.expiring.has(txid))) {
|
if (this.txs.has(txid) && (fast || !this.expiring.has(txid))) {
|
||||||
this.expiring.set(txid, fast ? Date.now() + (1000 * 60 * 10) : Date.now() + (1000 * 86400)); // 24 hours
|
this.expiring.set(txid, fast ? Date.now() + (1000 * 60 * 10) : Date.now() + (1000 * 86400)); // 24 hours
|
||||||
}
|
}
|
||||||
|
@ -301,6 +301,9 @@ class WebsocketHandler {
|
|||||||
rbfReplacements = rbfCache.getRbfTrees(false);
|
rbfReplacements = rbfCache.getRbfTrees(false);
|
||||||
fullRbfReplacements = rbfCache.getRbfTrees(true);
|
fullRbfReplacements = rbfCache.getRbfTrees(true);
|
||||||
}
|
}
|
||||||
|
for (const deletedTx of deletedTransactions) {
|
||||||
|
rbfCache.evict(deletedTx.txid);
|
||||||
|
}
|
||||||
const recommendedFees = feeApi.getRecommendedFee();
|
const recommendedFees = feeApi.getRecommendedFee();
|
||||||
|
|
||||||
this.wss.clients.forEach(async (client) => {
|
this.wss.clients.forEach(async (client) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user