cnct: do not ignore resolver reports after resolution

Preparation for anchor resolver. The recovered anchor amount should
still be included in the pending channel report even after it has been
resolved.

This also fixes an existing bug that in some cases caused the recovered
amount from an htlc resolver not to be included in the total.
This commit is contained in:
Joost Jager 2020-03-10 15:13:50 +01:00
parent 07a39b1ebf
commit d84b596f55
No known key found for this signature in database
GPG Key ID: A61B9D4C393C59C7
2 changed files with 6 additions and 4 deletions

@ -575,10 +575,6 @@ func (c *ChannelArbitrator) Report() []*ContractReport {
continue
}
if r.IsResolved() {
continue
}
report := r.report()
if report == nil {
continue

@ -2817,6 +2817,12 @@ func (r *rpcServer) arbitratorPopulateForceCloseResp(chanPoint *wire.OutPoint,
case contractcourt.ReportOutputIncomingHtlc,
contractcourt.ReportOutputOutgoingHtlc:
// Don't report details on htlcs that are no longer in
// limbo.
if report.LimboBalance == 0 {
break
}
incoming := report.Type == contractcourt.ReportOutputIncomingHtlc
htlc := &lnrpc.PendingHTLC{
Incoming: incoming,