From 441a31afac4c284a41c5923e77bd056e1928d47b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sun, 23 Feb 2020 18:04:03 -0500 Subject: [PATCH] Fix initial outbound sync infinite loop (XXX: Needs test) --- lightning/src/ln/peer_handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 6d1e8e7f0..5e5f1f8b8 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -354,7 +354,7 @@ impl PeerManager where InitSyncTracker::NoSyncRequested => {}, InitSyncTracker::ChannelsSyncing(c) if c < 0xffff_ffff_ffff_ffff => { let steps = ((MSG_BUFF_SIZE - peer.pending_outbound_buffer.len() + 2) / 3) as u8; - let all_messages = self.message_handler.route_handler.get_next_channel_announcements(0, steps); + let all_messages = self.message_handler.route_handler.get_next_channel_announcements(c, steps); for &(ref announce, ref update_a, ref update_b) in all_messages.iter() { encode_and_send_msg!(announce); encode_and_send_msg!(update_a); -- 2.39.5