]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Fix initial outbound sync infinite loop 2020-03-outbound-routes-loop
authorMatt Corallo <git@bluematt.me>
Sun, 23 Feb 2020 23:04:03 +0000 (18:04 -0500)
committerMatt Corallo <git@bluematt.me>
Wed, 18 Mar 2020 18:01:06 +0000 (14:01 -0400)
lightning/src/ln/peer_handler.rs

index 12cf937bc0f07785fbb58d93db58355dbbf0dce9..cd4d9142dcbf5855a4bbee7ec920ee7848314eda 100644 (file)
@@ -354,7 +354,7 @@ impl<Descriptor: SocketDescriptor, CM: Deref> PeerManager<Descriptor, CM> 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);