From e7a097a0fde6a328001a01a6132c4d28666e8cff Mon Sep 17 00:00:00 2001 From: Jesse de Wit Date: Mon, 25 Mar 2024 10:57:49 +0100 Subject: [PATCH] lnd forward starttime filter is in seconds --- lnd/forwards_sync.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lnd/forwards_sync.go b/lnd/forwards_sync.go index 8e9d09ef..839195ef 100644 --- a/lnd/forwards_sync.go +++ b/lnd/forwards_sync.go @@ -59,7 +59,7 @@ func (s *ForwardSync) forwardsSynchronizeOnce(ctx context.Context) { for { forwardHistory, err := s.client.client.ForwardingHistory(context.Background(), &lnrpc.ForwardingHistoryRequest{ - StartTime: startTime, + StartTime: startTime / 1_000_000_000, NumMaxEvents: 10000, }) if err != nil { @@ -84,7 +84,7 @@ func (s *ForwardSync) forwardsSynchronizeOnce(ctx context.Context) { } startTime = f.TimestampNs } - s.store.InsertForwards(ctx, forwards, s.nodeid) + err = s.store.InsertForwards(ctx, forwards, s.nodeid) if err != nil { log.Printf("forwardsSynchronizeOnce(%x) - store.InsertForwards() error: %v", s.nodeid, err) return