mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 06:02:51 +02:00
sqldb: fix end date filter when querying invoices
Previously, the SQL implementation of the invoice query simply converted the start and end timestamps to time and used them in SQL queries to check for inclusivity. However, this logic failed when the start and end timestamps were equal. This commit addresses and corrects this issue.
This commit is contained in:
@ -78,7 +78,7 @@ WHERE (
|
||||
created_at >= $6 OR
|
||||
$6 IS NULL
|
||||
) AND (
|
||||
created_at <= $7 OR
|
||||
created_at < $7 OR
|
||||
$7 IS NULL
|
||||
) AND (
|
||||
CASE
|
||||
|
@ -76,7 +76,7 @@ WHERE (
|
||||
created_at >= sqlc.narg('created_after') OR
|
||||
sqlc.narg('created_after') IS NULL
|
||||
) AND (
|
||||
created_at <= sqlc.narg('created_before') OR
|
||||
created_at < sqlc.narg('created_before') OR
|
||||
sqlc.narg('created_before') IS NULL
|
||||
) AND (
|
||||
CASE
|
||||
|
Reference in New Issue
Block a user