Skip to content

Commit 073a389

Browse files
committed
f Drain
1 parent 29a5d57 commit 073a389

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lightning-transaction-sync/src/esplora.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,15 +376,13 @@ impl FilterQueue {
376376
if !self.transactions.is_empty() {
377377
pending_registrations = true;
378378

379-
sync_state.watched_transactions.extend(self.transactions.iter());
380-
self.transactions = HashSet::new();
379+
sync_state.watched_transactions.extend(self.transactions.drain());
381380
}
382381

383382
if !self.outputs.is_empty() {
384383
pending_registrations = true;
385384

386-
sync_state.watched_outputs.extend(self.outputs.iter().cloned());
387-
self.outputs = HashSet::new();
385+
sync_state.watched_outputs.extend(self.outputs.drain());
388386
}
389387
pending_registrations
390388
}

0 commit comments

Comments
 (0)