Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions lightning_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -2431,6 +2431,9 @@ type ForwardingHistoryRequest struct {

// Offset is the index from which to start querying.
Offset uint32

// PeerAliasLookup enables looking up the alias
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: period

PeerAliasLookup bool
}

// ForwardingHistoryResponse contains the response to a forwarding history
Expand Down Expand Up @@ -2462,8 +2465,14 @@ type ForwardingEvent struct {
// millisatoshis.
AmountMsatOut lnwire.MilliSatoshi

// FeeMsat is the amount of fees earned in millisatoshis,
// FeeMsat is the amount of fees earned in millisatoshis.
FeeMsat lnwire.MilliSatoshi

// The peer alias of the incoming channel.
PeerAliasIn string

// The peer alias of the outgoing channel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: period

PeerAliasOut string
}

// ForwardingHistory returns a set of forwarding events for the period queried.
Expand All @@ -2478,10 +2487,11 @@ func (s *lightningClient) ForwardingHistory(ctx context.Context,
response, err := s.client.ForwardingHistory(
s.adminMac.WithMacaroonAuth(rpcCtx),
&lnrpc.ForwardingHistoryRequest{
StartTime: uint64(req.StartTime.Unix()),
EndTime: uint64(req.EndTime.Unix()),
IndexOffset: req.Offset,
NumMaxEvents: req.MaxEvents,
StartTime: uint64(req.StartTime.Unix()),
EndTime: uint64(req.EndTime.Unix()),
IndexOffset: req.Offset,
NumMaxEvents: req.MaxEvents,
PeerAliasLookup: req.PeerAliasLookup,
},
)
if err != nil {
Expand All @@ -2497,6 +2507,8 @@ func (s *lightningClient) ForwardingHistory(ctx context.Context,
AmountMsatIn: lnwire.MilliSatoshi(event.AmtInMsat),
AmountMsatOut: lnwire.MilliSatoshi(event.AmtOutMsat),
FeeMsat: lnwire.MilliSatoshi(event.FeeMsat),
PeerAliasIn: event.PeerAliasIn,
PeerAliasOut: event.PeerAliasOut,
}
}

Expand Down