mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-05 13:02:34 +02:00
sqldb+graph/db: fix UpsertNode bug
Account for the last_update field being null.
This commit is contained in:
@ -542,7 +542,8 @@ ON CONFLICT (pub_key, version)
|
||||
last_update = EXCLUDED.last_update,
|
||||
color = EXCLUDED.color,
|
||||
signature = EXCLUDED.signature
|
||||
WHERE EXCLUDED.last_update > nodes.last_update
|
||||
WHERE nodes.last_update IS NULL
|
||||
OR EXCLUDED.last_update > nodes.last_update
|
||||
RETURNING id
|
||||
`
|
||||
|
||||
|
Reference in New Issue
Block a user