mirror of
https://github.com/mempool/mempool.git
synced 2025-02-23 06:35:15 +01:00
avoid creating incomplete RBF trees
This commit is contained in:
parent
0a255d7fe5
commit
4dcbccd9b2
1 changed files with 5 additions and 1 deletions
|
@ -119,7 +119,11 @@ class RbfCache {
|
|||
|
||||
|
||||
public add(replaced: MempoolTransactionExtended[], newTxExtended: MempoolTransactionExtended): void {
|
||||
if (!newTxExtended || !replaced?.length || this.txs.has(newTxExtended.txid)) {
|
||||
if ( !newTxExtended
|
||||
|| !replaced?.length
|
||||
|| this.txs.has(newTxExtended.txid)
|
||||
|| !(replaced.some(tx => !this.replacedBy.has(tx.txid)))
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue