Browse Source

pytest: test that we reannounce node after restart.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
fee-tracking2
Rusty Russell 6 years ago
committed by Christian Decker
parent
commit
cbd1d1d0f2
  1. 16
      tests/test_gossip.py

16
tests/test_gossip.py

@ -842,6 +842,22 @@ def test_gossip_store_load(node_factory):
assert not l1.daemon.is_in_log('gossip_store.*truncating')
@pytest.mark.xfail(strict=True)
def test_node_reannounce(node_factory, bitcoind):
"Test that we reannounce a node when parameters change"
l1, l2, l3 = node_factory.line_graph(3, opts={'may_reconnect': True})
bitcoind.generate_block(5)
wait_for(lambda: l3.rpc.listnodes(l1.info['id'])['nodes'] != [])
assert only_one(l3.rpc.listnodes(l1.info['id'])['nodes'])['alias'].startswith('JUNIORBEAM')
l1.stop()
l1.daemon.opts['alias'] = 'SENIORBEAM'
l1.start()
wait_for(lambda: only_one(l3.rpc.listnodes(l1.info['id'])['nodes'])['alias'] == 'SENIORBEAM')
def test_gossipwith(node_factory):
l1, l2 = node_factory.line_graph(2, announce=True)

Loading…
Cancel
Save