mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-19 13:17:42 +02:00
gossipd: count deleted records correctly when loading gossip_store.
The result of an incorrect count was that we failed on next compaction. Fixes: #2743 Fixes: #2742 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
12a523f7c5
commit
eb5cc47bdd
2 changed files with 2 additions and 1 deletions
|
|
@ -541,6 +541,8 @@ bool gossip_store_load(struct routing_state *rstate, struct gossip_store *gs)
|
|||
|
||||
/* Skip deleted entries */
|
||||
if (be32_to_cpu(hdr.len) & GOSSIP_STORE_LEN_DELETED_BIT) {
|
||||
/* Count includes deleted! */
|
||||
gs->count++;
|
||||
gs->deleted++;
|
||||
goto next;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1155,7 +1155,6 @@ def test_gossip_store_compact(node_factory, bitcoind):
|
|||
wait_for(lambda: l2.daemon.is_in_log('gossip_store: Read '))
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
@unittest.skipIf(not DEVELOPER, "need dev-compact-gossip-store")
|
||||
def test_gossip_store_compact_restart(node_factory, bitcoind):
|
||||
l2 = setup_gossip_store_test(node_factory, bitcoind)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue