mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-23 06:54:30 +01:00
sql: fix nodes table update.
Without this patch, we only ever loaded the "nodes" table once, then didn't see updates. How this ever got past CI is a mystery; perhaps valgrind was so slow that the updated node_announcement hit the gossmap before we even asked sql on l3 about the nodes table? Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: Plugins: `sql` nodes table now gets refreshed when gossip changes.
This commit is contained in:
committed by
Alex Myers
parent
df0661ce22
commit
1e2bc665ae
@@ -880,7 +880,7 @@ static bool extract_node_id(int gosstore_fd, size_t off, u16 type,
|
||||
!= sizeof(flen))
|
||||
return false;
|
||||
|
||||
node_id_off = off + feature_len_off + 2 + flen + 4;
|
||||
node_id_off = off + feature_len_off + 2 + be16_to_cpu(flen) + 4;
|
||||
if (pread(gosstore_fd, id, sizeof(*id), node_id_off) != sizeof(*id))
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user