contractcourt+server: settle invoice for on-chain HTLC sweep

In this commit, we extend the htlcSuccessResolver to settle the invoice,
if any, of the corresponding on-chain HTLC sweep. This ensures that the
invoice state is consistent as when claiming the HTLC "off-chain".
This commit is contained in:
Wilmer Paulino committed 2019-01-22 20:46:14 -08:00
1 parent 974e0f2df5
commit 41f638c7cf
4 files changed
+30 -4

No files matched your search

+2 -1
View File
@@ -728,7 +728,8 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB, cc *chainControl,
DisableChannel: func(op wire.OutPoint) error {
return s.announceChanStatus(op, true)
},
Sweeper: s.sweeper,
Sweeper: s.sweeper,
SettleInvoice: s.invoices.SettleInvoice,
}, chanDB)
s.breachArbiter = newBreachArbiter(&BreachConfig{