Skip to content

Commit 9521500

Browse files
committed
fix: Drop duplicated received filter update
This fixes an issue introduced in #211 where the `receiver_filter_heights` lock isn't released after inserting the received height, and then the same task tries to acquire the lock again just a bit below in `mark_filter_received` -> deadlock. So, #211 should have not introduced the filter height updates here since they already exist in `mark_filter_received`. Yet the stats updates introduced in the same place are legit.
1 parent b2bdf7d commit 9521500

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

dash-spv/src/sync/message_handlers.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,6 @@ impl<
629629
stats_lock.last_filter_received_time = Some(std::time::Instant::now());
630630
}
631631

632-
// Get the shared filter heights arc from stats
633-
let stats_lock = self.stats.read().await;
634-
let received_filter_heights = stats_lock.received_filter_heights.clone();
635-
drop(stats_lock); // Release the stats lock before acquiring the mutex
636-
637-
// Now lock the heights and insert
638-
let mut heights = received_filter_heights.lock().await;
639-
heights.insert(height);
640632
tracing::trace!(
641633
"📊 Recorded filter received at height {} for block {}",
642634
height,

0 commit comments

Comments
 (0)