From: Arik Sosman Date: Fri, 10 May 2024 23:42:20 +0000 (-0700) Subject: Only consider channel announcements with bidirectional updates. X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=db645790287c33724d36393ee19d3c5e0e5c1240;p=rapid-gossip-sync-server Only consider channel announcements with bidirectional updates. --- diff --git a/src/lookup.rs b/src/lookup.rs index fc0385c..310c124 100644 --- a/src/lookup.rs +++ b/src/lookup.rs @@ -83,7 +83,7 @@ pub(super) async fn fetch_channel_announcements(delta_set: &mut DeltaS log_info!(logger, "Retrieved read-only network graph copy"); let channel_iterator = read_only_graph.channels().unordered_iter(); channel_iterator - .filter(|c| c.1.announcement_message.is_some()) + .filter(|c| c.1.announcement_message.is_some() && c.1.one_to_two.is_some() && c.1.two_to_one.is_some()) .map(|c| c.1.announcement_message.as_ref().unwrap().contents.short_channel_id as i64) .collect::>() }; @@ -365,7 +365,6 @@ pub(super) async fn fetch_channel_updates(delta_set: &mut DeltaSet, cl let mut previous_scid = u64::MAX; let mut previously_seen_directions = (false, false); - // let mut previously_seen_directions = (false, false); let mut intermediate_update_count = 0; while let Some(row_res) = pinned_updates.next().await { let intermediate_update = row_res.unwrap();