Skip to content

Commit

Permalink
pytest: Add debugging to test_gossip_store_compact_on_load
Browse files Browse the repository at this point in the history
This flake has been difficult to reproduce, so let's dump the gossip
store to aid in debugging. See issue #5410.

Changelog-None
  • Loading branch information
endothermicdev authored and rustyrussell committed Aug 25, 2022
1 parent 3ce2673 commit 0abe2e3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_gossip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1716,6 +1716,11 @@ def test_gossip_store_load_no_channel_update(node_factory):
def test_gossip_store_compact_on_load(node_factory, bitcoind):
l2 = setup_gossip_store_test(node_factory, bitcoind)

gs_path = os.path.join(l2.daemon.lightning_dir, TEST_NETWORK, 'gossip_store')
gs = subprocess.run(['devtools/dump-gossipstore', '--print-deleted', gs_path],
check=True, timeout=TIMEOUT, stdout=subprocess.PIPE)
print(gs.stdout.decode())

l2.restart()

wait_for(lambda: l2.daemon.is_in_log(r'gossip_store_compact_offline: [5-8] deleted, 9 copied'))
Expand Down

0 comments on commit 0abe2e3

Please sign in to comment.