Skip to content

Commit

Permalink
Merge pull request #78 from arik-so/conservative-announcements
Browse files Browse the repository at this point in the history
Only consider channel announcements with bidirectional updates.
  • Loading branch information
TheBlueMatt authored May 13, 2024
2 parents 81c27c8 + db64579 commit a18c256
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub(super) async fn fetch_channel_announcements<L: Deref>(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::<Vec<_>>()
};
Expand Down Expand Up @@ -365,7 +365,6 @@ pub(super) async fn fetch_channel_updates<L: Deref>(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();
Expand Down

0 comments on commit a18c256

Please sign in to comment.