File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -510,6 +510,10 @@ impl Mempool {
510
510
. chain_err ( || "failed to update mempool from daemon" ) ?;
511
511
let to_remove: HashSet < & Txid > = old_txids. difference ( & new_txids) . collect ( ) ;
512
512
513
+ // 2. Remove missing transactions. Even if we are unable to download new transactions from
514
+ // the daemon, we still want to remove the transactions that are no longer in the mempool.
515
+ mempool. write ( ) . unwrap ( ) , remove ( to_remove) ;
516
+
513
517
// 2. Download the new transactions from the daemon's mempool
514
518
let to_add = Mempool :: download_new_mempool_txs ( & daemon, & old_txids, & new_txids) ?;
515
519
@@ -518,8 +522,6 @@ impl Mempool {
518
522
let mut mempool = mempool. write ( ) . unwrap ( ) ;
519
523
// Add new transactions
520
524
mempool. add ( to_add) ;
521
- // Remove missing transactions
522
- mempool. remove ( to_remove) ;
523
525
524
526
mempool. count
525
527
. with_label_values ( & [ "txs" ] )
You can’t perform that action at this time.
0 commit comments