cnct: expose non-incubating htlcs after channel force close

In this commit we fix a reporting gap that previously existed for htlcs
that were still contested.
This commit is contained in:
Joost Jager committed 2019-02-01 09:36:47 +01:00
1 parent 5c03a0db99
commit 55aee9c703
7 files changed
+235 -7

No files matched your search

+15
View File
@@ -566,6 +566,21 @@ func (c *ChainArbitrator) UpdateContractSignals(chanPoint wire.OutPoint,
return nil
}
// GetChannelArbitrator safely returns the channel arbitrator for a given
// channel outpoint.
func (c *ChainArbitrator) GetChannelArbitrator(chanPoint wire.OutPoint) (
*ChannelArbitrator, error) {
c.Lock()
arbitrator, ok := c.activeChannels[chanPoint]
c.Unlock()
if !ok {
return nil, fmt.Errorf("unable to find arbitrator")
}
return arbitrator, nil
}
// forceCloseReq is a request sent from an outside sub-system to the arbitrator
// that watches a particular channel to broadcast the commitment transaction,
// and enter the resolution phase of the channel.