diff --git a/cmd/lncli/commands.go b/cmd/lncli/commands.go index 45e06a51..ad7f751e 100644 --- a/cmd/lncli/commands.go +++ b/cmd/lncli/commands.go @@ -3532,7 +3532,7 @@ var forwardingHistoryCommand = cli.Command{ payment circuits (HTLCs) over a particular time range (--start_time and --end_time). The start and end times are meant to be expressed in seconds since the Unix epoch. If --start_time isn't provided, - then 24 hours ago is used. If --end_time isn't provided, + then the Unix epoch (01-01-1970) is used. If --end_time isn't provided, then the current time is used. The max number of events returned is 50k. The default number is 100, diff --git a/rpcserver.go b/rpcserver.go index 99234497..c42e5696 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -4637,13 +4637,8 @@ func (r *rpcServer) ForwardingHistory(ctx context.Context, numEvents uint32 ) - // If the start time wasn't specified, we'll default to 24 hours ago. - if req.StartTime == 0 { - now := time.Now() - startTime = now.Add(-time.Hour * 24) - } else { - startTime = time.Unix(int64(req.StartTime), 0) - } + // startTime defaults to the Unix epoch (0 unixtime, or midnight 01-01-1970). + startTime = time.Unix(int64(req.StartTime), 0) // If the end time wasn't specified, assume a default end time of now. if req.EndTime == 0 {