mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
common: fix endless loop in gossmap iteration.
If we need to iterate forward to find a timestamp (only happens if we have gossip older than 2 hours), we didn't exit the loop, as it didn't actually move the offset. Fixes: https://github.com/ElementsProject/lightning/issues/7462 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
88024fa8d6
commit
15fb37f6d1
1 changed files with 2 additions and 0 deletions
|
@ -1634,6 +1634,8 @@ void gossmap_iter_fast_forward(const struct gossmap *map,
|
|||
|
||||
if (be32_to_cpu(ghdr.timestamp) >= timestamp)
|
||||
break;
|
||||
|
||||
iter->offset += be16_to_cpu(ghdr.len) + sizeof(ghdr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue