mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
contractcourt: only send resolution messages if we have any to send
This commit is contained in:
parent
877b8c55d3
commit
8a34b1ae88
@ -895,11 +895,14 @@ func (c *ChannelArbitrator) stateStep(
|
||||
|
||||
// With the commitment broadcast, we'll then send over all
|
||||
// messages we can send immediately.
|
||||
err = c.cfg.DeliverResolutionMsg(pktsToSend...)
|
||||
if err != nil {
|
||||
// TODO(roasbeef): make sure packet sends are idempotent
|
||||
log.Errorf("unable to send pkts: %v", err)
|
||||
return StateError, closeTx, err
|
||||
if len(pktsToSend) != 0 {
|
||||
err := c.cfg.DeliverResolutionMsg(pktsToSend...)
|
||||
if err != nil {
|
||||
// TODO(roasbeef): make sure packet sends are
|
||||
// idempotent
|
||||
log.Errorf("unable to send pkts: %v", err)
|
||||
return StateError, closeTx, err
|
||||
}
|
||||
}
|
||||
|
||||
log.Debugf("ChannelArbitrator(%v): inserting %v contract "+
|
||||
|
Loading…
Reference in New Issue
Block a user