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:
1 parent
1868c7dec1
commit
2c4dbfa19f
10 files changed
+295
-251
No files matched your search
@@ -1449,6 +1449,7 @@ func (l *channelLink) handleDownstreamPkt(pkt *htlcPacket) {
|
||||
// Send a settle event notification to htlcNotifier.
|
||||
l.cfg.HtlcNotifier.NotifySettleEvent(
|
||||
newHtlcKey(pkt),
|
||||
htlc.PaymentPreimage,
|
||||
getEventType(pkt),
|
||||
)
|
||||
|
||||
@@ -2982,6 +2983,7 @@ func (l *channelLink) settleHTLC(preimage lntypes.Preimage,
|
||||
HtlcID: pd.HtlcIndex,
|
||||
},
|
||||
},
|
||||
preimage,
|
||||
HtlcEventTypeReceive,
|
||||
)
|
||||
|
||||
|
||||
Reference in new issue
Block a user