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:
parent
07a39b1ebf
commit
d84b596f55
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user