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
|
// With the commitment broadcast, we'll then send over all
|
||||||
// messages we can send immediately.
|
// messages we can send immediately.
|
||||||
err = c.cfg.DeliverResolutionMsg(pktsToSend...)
|
if len(pktsToSend) != 0 {
|
||||||
if err != nil {
|
err := c.cfg.DeliverResolutionMsg(pktsToSend...)
|
||||||
// TODO(roasbeef): make sure packet sends are idempotent
|
if err != nil {
|
||||||
log.Errorf("unable to send pkts: %v", err)
|
// TODO(roasbeef): make sure packet sends are
|
||||||
return StateError, closeTx, err
|
// idempotent
|
||||||
|
log.Errorf("unable to send pkts: %v", err)
|
||||||
|
return StateError, closeTx, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debugf("ChannelArbitrator(%v): inserting %v contract "+
|
log.Debugf("ChannelArbitrator(%v): inserting %v contract "+
|
||||||
|
Loading…
Reference in New Issue
Block a user