feature: expose preimage in forward+settle event

Until now, clients of SubscribeHTLCEvents didn't have access to the settled preimage. The API allows to intercept forward event and to be updated on forward events however the forward+settle event does not include the payment preimage. This pr changes allows it.
This commit is contained in:
offerm committed 2021-06-15 22:01:24 +03:00
1 parent 1868c7dec1
commit 2c4dbfa19f
10 files changed
+295 -251

No files matched your search

+2 -1
View File
@@ -282,5 +282,6 @@ type htlcNotifier interface {
// NotifySettleEvent notifies the HtlcNotifier that a htlc that we
// committed to as part of a forward or a receive to our node has been
// settled.
NotifySettleEvent(key HtlcKey, eventType HtlcEventType)
NotifySettleEvent(key HtlcKey, preimage lntypes.Preimage,
eventType HtlcEventType)
}