mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 06:37:21 +01:00
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:
10
rpcserver.go
10
rpcserver.go
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user