htlcswitch+channeldb: add htlcidx to fwding log

In this commit we add htlcindex field to the forwardingevent
struct, which is persisted alongside the other event fields.
This commit is contained in:
Abdullahi Yunus
2025-05-15 12:15:00 +01:00
committed by Olaoluwa Osuntokun
parent b27f401ccc
commit 43f8bf288f
3 changed files with 180 additions and 3 deletions

View File

@@ -3074,6 +3074,12 @@ func (s *Switch) handlePacketSettle(packet *htlcPacket) error {
OutgoingChanID: circuit.Outgoing.ChanID,
AmtIn: circuit.IncomingAmount,
AmtOut: circuit.OutgoingAmount,
IncomingHtlcID: fn.Some(
circuit.Incoming.HtlcID,
),
OutgoingHtlcID: fn.Some(
circuit.Outgoing.HtlcID,
),
},
)
s.fwdEventMtx.Unlock()