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:
1 file changed
+1
-1
+1
-1
@@ -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())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user