contractcourt: only send resolution messages if we have any to send
This commit is contained in:
1 file changed
+8
-5
@@ -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 "+
|
||||||
|
|||||||
Reference in new issue
Block a user