MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_gossip_store_compact_noappend

Function test_gossip_store_compact_noappend

tests/test_gossip.py:1645–1655  ·  view source on GitHub ↗
(node_factory, bitcoind)

Source from the content-addressed store, hash-verified

1643
1644@pytest.mark.developer("need dev-compact-gossip-store")
1645def test_gossip_store_compact_noappend(node_factory, bitcoind):
1646 l2 = setup_gossip_store_test(node_factory, bitcoind)
1647
1648 # It should truncate this, not leave junk!
1649 with open(os.path.join(l2.daemon.lightning_dir, TEST_NETWORK, 'gossip_store.tmp'), 'wb') as f:
1650 f.write(bytearray.fromhex("07deadbeef"))
1651
1652 l2.rpc.call('dev-compact-gossip-store')
1653 l2.restart()
1654 wait_for(lambda: l2.daemon.is_in_log('gossip_store: Read '))
1655 assert not l2.daemon.is_in_log('gossip_store:.*truncate')
1656
1657
1658@pytest.mark.developer("updates are delayed without --dev-fast-gossip")

Callers

nothing calls this directly

Calls 7

wait_forFunction · 0.90
setup_gossip_store_testFunction · 0.85
joinMethod · 0.80
restartMethod · 0.80
is_in_logMethod · 0.80
writeMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected