Merge pull request #5236 from offerm/preimage-to-settleevent

feature: expose preimage in forward+settle event
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-07-09 14:35:11 -07:00
commit db3819fcef
10 files changed
+295 -251

No files matched your search

+3 -2
View File
@@ -848,9 +848,10 @@ func (s *Switch) handleLocalResponse(pkt *htlcPacket) {
key := newHtlcKey(pkt)
eventType := getEventType(pkt)
switch pkt.htlc.(type) {
switch htlc := pkt.htlc.(type) {
case *lnwire.UpdateFulfillHTLC:
s.cfg.HtlcNotifier.NotifySettleEvent(key, eventType)
s.cfg.HtlcNotifier.NotifySettleEvent(key, htlc.PaymentPreimage,
eventType)
case *lnwire.UpdateFailHTLC:
s.cfg.HtlcNotifier.NotifyForwardingFailEvent(key, eventType)