lnd+lnrpc: update fwdinghistory message

In this commit we update the returned message for fwdinghistory
to include the htlcindex for all forwarded htlcs.
This commit is contained in:
Abdullahi Yunus committed 2025-06-06 12:21:46 +01:00
1 parent f79e6137c1
commit a0634e4ade
5 files changed
+860 -778

No files matched your search

+10
View File
@@ -8100,6 +8100,16 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context,
AmtOutMsat: uint64(amtOutMsat),
}
// If the incoming htlc id is present, add it to the response.
event.IncomingHtlcID.WhenSome(func(id uint64) {
resp.ForwardingEvents[i].IncomingHtlcId = &id
})
// If the outgoing htlc id is present, add it to the response.
event.OutgoingHtlcID.WhenSome(func(id uint64) {
resp.ForwardingEvents[i].OutgoingHtlcId = &id
})
if req.PeerAliasLookup {
aliasIn, err := getRemoteAlias(event.IncomingChanID)
if err != nil {