htlcswitch: add final htlc event to notifier

This commit is contained in:
Joost Jager committed 2022-10-27 16:42:36 +02:00
1 parent 28256b7ea8
commit 511fb00777
21 files changed
+729 -404

No files matched your search

+12
View File
@@ -477,6 +477,18 @@ func (h *htlcSuccessResolver) checkpointClaim(spendTx *chainhash.Hash,
return err
}
// Send notification.
h.ChainArbitratorConfig.HtlcNotifier.NotifyFinalHtlcEvent(
channeldb.CircuitKey{
ChanID: h.ShortChanID,
HtlcID: h.htlc.HtlcIndex,
},
channeldb.FinalHtlcInfo{
Settled: true,
Offchain: false,
},
)
// Create a resolver report for claiming of the htlc itself.
amt := btcutil.Amount(h.htlcResolution.SweepSignDesc.Output.Value)
reports := []*channeldb.ResolverReport{