From 0abe2e3af1ccd9941992266b65f85aa32d3ccb23 Mon Sep 17 00:00:00 2001 From: Alex Myers Date: Thu, 21 Jul 2022 14:04:04 -0500 Subject: [PATCH] pytest: Add debugging to test_gossip_store_compact_on_load This flake has been difficult to reproduce, so let's dump the gossip store to aid in debugging. See issue #5410. Changelog-None --- tests/test_gossip.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_gossip.py b/tests/test_gossip.py index fcd154b2a..aa871dcca 100644 --- a/tests/test_gossip.py +++ b/tests/test_gossip.py @@ -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'))