From 5ac9ba6472c4ed89a5ac8565a1f02b4289cbc82d Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 9 Apr 2019 19:48:34 -0700 Subject: [PATCH] htlcswitch: synchronously send the chan sync message to the remote peer In this commit, we modify the starting link logic to always send the chan sync message to the remote peer in a synchronous manner. Otherwise, it's possible that we fail very quickly below this block, and don't ever send the message to the remote peer. --- htlcswitch/link.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 076415b2..d6041266 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -574,7 +574,7 @@ func (l *channelLink) syncChanStates() error { return fmt.Errorf("unable to generate chan sync message for "+ "ChannelPoint(%v)", l.channel.ChannelPoint()) } - if err := l.cfg.Peer.SendMessage(false, localChanSyncMsg); err != nil { + if err := l.cfg.Peer.SendMessage(true, localChanSyncMsg); err != nil { return fmt.Errorf("Unable to send chan sync message for "+ "ChannelPoint(%v)", l.channel.ChannelPoint()) }