diff --git a/channeldb/db.go b/channeldb/db.go index 0a207b7c9..fd198720e 100644 --- a/channeldb/db.go +++ b/channeldb/db.go @@ -493,8 +493,8 @@ func (d *DB) MarkChanFullyClosed(chanPoint *wire.OutPoint) error { chanSummaryBytes := closedChanBucket.Get(chanID) if chanSummaryBytes == nil { - return fmt.Errorf("no closed channel by that chanID " + - "found") + return fmt.Errorf("no closed channel for "+ + "chan_point=%v found", chanPoint) } chanSummaryReader := bytes.NewReader(chanSummaryBytes) diff --git a/contractcourt/chain_arbitrator.go b/contractcourt/chain_arbitrator.go index ffd0cc769..9acfb4d00 100644 --- a/contractcourt/chain_arbitrator.go +++ b/contractcourt/chain_arbitrator.go @@ -276,6 +276,8 @@ func (c *ChainArbitrator) resolveContract(chanPoint wire.OutPoint, // the channel source. err := c.chanSource.MarkChanFullyClosed(&chanPoint) if err != nil { + log.Errorf("ChainArbitrator: unable to mark ChannelPoint(%v) "+ + "fully closed: %v", chanPoint, err) return err } diff --git a/contractcourt/chain_watcher.go b/contractcourt/chain_watcher.go index 050d9eb96..3f403fb8b 100644 --- a/contractcourt/chain_watcher.go +++ b/contractcourt/chain_watcher.go @@ -457,8 +457,9 @@ func (c *chainWatcher) dispatchCooperativeClose(commitSpend *chainntnfs.SpendDet return } - log.Infof("Waiting for txid=%v to close ChannelPoint(%v) on chain", - commitSpend.SpenderTxHash, c.chanState.FundingOutpoint) + log.Infof("closeObserver: waiting for txid=%v to close "+ + "ChannelPoint(%v) on chain", commitSpend.SpenderTxHash, + c.chanState.FundingOutpoint) select { case confInfo, ok := <-confNtfn.Confirmed: @@ -467,8 +468,9 @@ func (c *chainWatcher) dispatchCooperativeClose(commitSpend *chainntnfs.SpendDet return } - log.Infof("ChannelPoint(%v) is fully closed, at height: %v", - c.chanState.FundingOutpoint, confInfo.BlockHeight) + log.Infof("closeObserver: ChannelPoint(%v) is fully "+ + "closed, at height: %v", c.chanState.FundingOutpoint, + confInfo.BlockHeight) err := c.markChanClosed() if err != nil { @@ -724,8 +726,9 @@ func (c *CooperativeCloseCtx) LogPotentialClose(potentialClose *channeldb.Channe return } - log.Infof("Waiting for txid=%v to close ChannelPoint(%v) on chain", - potentialClose.ClosingTXID, c.watcher.chanState.FundingOutpoint) + log.Infof("closeCtx: waiting for txid=%v to close "+ + "ChannelPoint(%v) on chain", potentialClose.ClosingTXID, + c.watcher.chanState.FundingOutpoint) select { case confInfo, ok := <-confNtfn.Confirmed: @@ -734,7 +737,7 @@ func (c *CooperativeCloseCtx) LogPotentialClose(potentialClose *channeldb.Channe return } - log.Infof("ChannelPoint(%v) is fully closed, at "+ + log.Infof("closeCtx: ChannelPoint(%v) is fully closed, at "+ "height: %v", c.watcher.chanState.FundingOutpoint, confInfo.BlockHeight) @@ -751,14 +754,14 @@ func (c *CooperativeCloseCtx) LogPotentialClose(potentialClose *channeldb.Channe err := c.watcher.chanState.CloseChannel(potentialClose) if err != nil { - log.Warnf("unable to update latest close for "+ - "ChannelPoint(%v): %v", + log.Warnf("closeCtx: unable to update latest "+ + "close for ChannelPoint(%v): %v", c.watcher.chanState.FundingOutpoint, err) } err = c.watcher.markChanClosed() if err != nil { - log.Errorf("unable to mark chan fully "+ + log.Errorf("closeCtx: unable to mark chan fully "+ "closed: %v", err) return }