contractcourt/channel_arbitrator: properly commit to next state

This commit is contained in:
Johan T. Halseth 2018-08-21 12:21:14 +02:00
parent 9f4685228e
commit 245dae0071
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -613,7 +613,11 @@ func (c *ChannelArbitrator) stateStep(triggerHeight uint32,
log.Infof("ChannelPoint(%v) has been fully resolved "+ log.Infof("ChannelPoint(%v) has been fully resolved "+
"on-chain at height=%v", c.cfg.ChanPoint, triggerHeight) "on-chain at height=%v", c.cfg.ChanPoint, triggerHeight)
return nextState, closeTx, c.cfg.MarkChannelResolved()
if err := c.cfg.MarkChannelResolved(); err != nil {
log.Errorf("unable to mark channel resolved: %v", err)
return StateError, closeTx, err
}
} }
if err := c.log.CommitState(nextState); err != nil { if err := c.log.CommitState(nextState); err != nil {