mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-24 07:07:46 +01:00
We actually pruned before we got all the channels. Extend the pruning time, which unfortunately makes the test slower. ``` 2024-11-18T02:13:11.7013278Z node_factory = <pyln.testing.utils.NodeFactory object at 0x7ff72969e820> 2024-11-18T02:13:11.7014386Z bitcoind = <pyln.testing.utils.BitcoinD object at 0x7ff72968fe20> 2024-11-18T02:13:11.7014996Z 2024-11-18T02:13:11.7015271Z def test_gossip_pruning(node_factory, bitcoind): 2024-11-18T02:13:11.7016222Z """ Create channel and see it being updated in time before pruning 2024-11-18T02:13:11.7017037Z """ 2024-11-18T02:13:11.7017871Z l1, l2, l3 = node_factory.get_nodes(3, opts={'dev-fast-gossip-prune': None, 2024-11-18T02:13:11.7018971Z 'allow_bad_gossip': True}) 2024-11-18T02:13:11.7019634Z 2024-11-18T02:13:11.7020236Z l1.rpc.connect(l2.info['id'], 'localhost', l2.port) 2024-11-18T02:13:11.7021153Z l2.rpc.connect(l3.info['id'], 'localhost', l3.port) 2024-11-18T02:13:11.7021806Z 2024-11-18T02:13:11.7022226Z scid1, _ = l1.fundchannel(l2, 10**6) 2024-11-18T02:13:11.7022886Z scid2, _ = l2.fundchannel(l3, 10**6) 2024-11-18T02:13:11.7023458Z 2024-11-18T02:13:11.7023907Z mine_funding_to_announce(bitcoind, [l1, l2, l3]) 2024-11-18T02:13:11.7025183Z l1_initial_cupdate_timestamp = only_one(l1.rpc.listchannels(source=l1.info['id'])['channels'])['last_update'] 2024-11-18T02:13:11.7026179Z 2024-11-18T02:13:11.7027358Z # Get timestamps of initial updates, so we can ensure they change. 2024-11-18T02:13:11.7028171Z # Channels should be activated locally 2024-11-18T02:13:11.7029326Z > wait_for(lambda: [c['active'] for c in l1.rpc.listchannels()['channels']] == [True] * 4) ``` We can see in logs, it actually started pruning already: ``` 2024-11-18T02:13:11.9622477Z lightningd-1 2024-11-18T01:52:03.570Z DEBUG gossipd: Pruning channel 105x1x0 from network view (ages 1731894723 and 0) ``` Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> |
||
---|---|---|
.. | ||
data | ||
fuzz | ||
plugins | ||
vectors | ||
autogenerate-rpc-examples.py | ||
benchmark.py | ||
conftest.py | ||
fixtures.py | ||
rkls_github_canned_server.py | ||
test_askrene.py | ||
test_bookkeeper.py | ||
test_cln_rs.py | ||
test_clnrest.py | ||
test_closing.py | ||
test_connection.py | ||
test_db.py | ||
test_gossip.py | ||
test_invoices.py | ||
test_misc.py | ||
test_mkfunding.py | ||
test_onion.py | ||
test_opening.py | ||
test_pay.py | ||
test_plugin.py | ||
test_reckless.py | ||
test_renepay.py | ||
test_restart.py | ||
test_runes.py | ||
test_splice.py | ||
test_splicing.py | ||
test_splicing_disconnect.py | ||
test_splicing_insane.py | ||
test_wallet.py | ||
test_xpay.py | ||
utils.py | ||
valgrind-suppressions.txt |