From 8afc7bf66e1bd6469c1d5cc8ab5e7f2f188213b1 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 24 May 2018 10:24:31 +0200 Subject: [PATCH] contractcourt/chain_arbitrator: add TODO for removing watchForChannelClose --- contractcourt/chain_arbitrator.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contractcourt/chain_arbitrator.go b/contractcourt/chain_arbitrator.go index 944b6cc8..c567dcf9 100644 --- a/contractcourt/chain_arbitrator.go +++ b/contractcourt/chain_arbitrator.go @@ -392,11 +392,17 @@ func (c *ChainArbitrator) Start() error { } // Next, for each channel is the closing state, we'll launch a - // corresponding more restricted resolver. + // corresponding more restricted resolver, as we don't have to watch + // the chain any longer, only resolve the contracts on the confirmed + // commitment. for _, closeChanInfo := range closingChannels { // If this is a pending cooperative close channel then we'll // simply launch a goroutine to wait until the closing // transaction has been confirmed. + // TODO(halseth): can remove this since no coop close channels + // should be "pending close" after the recent changes. Keeping + // it for a bit in case someone with a coop close channel in + // the pending close state upgrades to the new commit. if closeChanInfo.CloseType == channeldb.CooperativeClose { go c.watchForChannelClose(closeChanInfo)