Skip to content

Commit 18efdec

Browse files
shesekphilippem
authored andcommitted
Refactor to use HashSet::difference()
1 parent 71bd780 commit 18efdec

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/new_index/mempool.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,8 +540,7 @@ impl Mempool {
540540

541541
// Find transactions available in bitcoind's mempool but not indexed locally
542542
let new_txids = bitcoind_txids
543-
.iter()
544-
.filter(|&txid| !indexed_txids.contains(txid))
543+
.difference(&indexed_txids)
545544
.collect::<Vec<_>>();
546545

547546
debug!(

0 commit comments

Comments
 (0)