mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
sql: fix bug where nodes table would get duplicate entries.
As soon as we apply the next commit, we get a new problem: the delete code didn't work. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Alex Myers
parent
8c3baa98cf
commit
df0661ce22
@@ -850,7 +850,7 @@ static void delete_node_from_db(struct command *cmd,
|
|||||||
err = sqlite3_exec(db,
|
err = sqlite3_exec(db,
|
||||||
tal_fmt(tmpctx,
|
tal_fmt(tmpctx,
|
||||||
"DELETE FROM nodes"
|
"DELETE FROM nodes"
|
||||||
" WHERE nodeid = '%s'",
|
" WHERE nodeid = X'%s'",
|
||||||
node_id_to_hexstr(tmpctx, id)),
|
node_id_to_hexstr(tmpctx, id)),
|
||||||
NULL, NULL, &errmsg);
|
NULL, NULL, &errmsg);
|
||||||
if (err != SQLITE_OK)
|
if (err != SQLITE_OK)
|
||||||
|
|||||||
Reference in New Issue
Block a user