Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/tracking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ pub(crate) async fn download_gossip<L: Deref + Clone + Send + Sync + 'static>(pe

let was_previously_caught_up_with_gossip = is_caught_up_with_gossip;
// TODO: make new message threshold (20) adjust based on connected peer count
is_caught_up_with_gossip = new_message_count < 20 && previous_announcement_count > 0 && previous_update_count > 0;
// There must be two channel updates (one for each end) to generate
// a snapshot with information about the channel.
is_caught_up_with_gossip = new_message_count < 20 && previous_announcement_count > 0 && previous_update_count > 0 && counter.channel_updates > 1;

if new_message_count > 0 {
latest_new_gossip_time = Instant::now();
}
Expand Down
Loading