From 245dae0071dfe976231388c832dd9bdbf8097b2a Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Tue, 21 Aug 2018 12:21:14 +0200 Subject: [PATCH] contractcourt/channel_arbitrator: properly commit to next state --- contractcourt/channel_arbitrator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contractcourt/channel_arbitrator.go b/contractcourt/channel_arbitrator.go index 8c3689b1..e1d2151d 100644 --- a/contractcourt/channel_arbitrator.go +++ b/contractcourt/channel_arbitrator.go @@ -613,7 +613,11 @@ func (c *ChannelArbitrator) stateStep(triggerHeight uint32, log.Infof("ChannelPoint(%v) has been fully resolved "+ "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 {