mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-17 13:06:51 +02:00
lndclient: add forwarding history call
This commit is contained in:
parent
c1a9889e4d
commit
e016d2ebf4
3 changed files with 108 additions and 2 deletions
|
|
@ -182,6 +182,17 @@ func (h *mockLightningClient) ClosedChannels(_ context.Context) ([]lndclient.Clo
|
|||
return h.lnd.ClosedChannels, nil
|
||||
}
|
||||
|
||||
// ForwardingHistory returns the mock's set of forwarding events.
|
||||
func (h *mockLightningClient) ForwardingHistory(_ context.Context,
|
||||
_ lndclient.ForwardingHistoryRequest) (*lndclient.ForwardingHistoryResponse,
|
||||
error) {
|
||||
|
||||
return &lndclient.ForwardingHistoryResponse{
|
||||
LastIndexOffset: 0,
|
||||
Events: h.lnd.ForwardingEvents,
|
||||
}, nil
|
||||
}
|
||||
|
||||
// ChannelBackup retrieves the backup for a particular channel. The
|
||||
// backup is returned as an encrypted chanbackup.Single payload.
|
||||
func (h *mockLightningClient) ChannelBackup(context.Context, wire.OutPoint) ([]byte, error) {
|
||||
|
|
|
|||
|
|
@ -163,8 +163,9 @@ type LndMockServices struct {
|
|||
// keyed by hash string.
|
||||
Invoices map[lntypes.Hash]*lndclient.Invoice
|
||||
|
||||
Channels []lndclient.ChannelInfo
|
||||
ClosedChannels []lndclient.ClosedChannel
|
||||
Channels []lndclient.ChannelInfo
|
||||
ClosedChannels []lndclient.ClosedChannel
|
||||
ForwardingEvents []lndclient.ForwardingEvent
|
||||
|
||||
WaitForFinished func()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue