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.
This commit is contained in:
Olaoluwa Osuntokun committed 2019-04-10 18:01:52 -07:00
1 parent 71e080a2fb
commit 5ac9ba6472
1 file changed
+1 -1
+1 -1
View File
@@ -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())
}