pytest: Check that channels are announced and activated correctly

This commit is contained in:
Christian Decker 2017-04-04 13:44:25 +02:00 committed by Rusty Russell
parent f4cf485f00
commit b6fea5b429

View File

@ -149,11 +149,19 @@ class LightningDTests(BaseLightningDTests):
l1.daemon.wait_for_log('Normal operation')
l2.daemon.wait_for_log('Normal operation')
time.sleep(1)
l1.daemon.wait_for_log('peer_out WIRE_ANNOUNCEMENT_SIGNATURES')
l1.daemon.wait_for_log('peer_in WIRE_ANNOUNCEMENT_SIGNATURES')
l1.daemon.wait_for_log('peer_out WIRE_CHANNEL_ANNOUNCEMENT')
l1.daemon.wait_for_log('peer_in WIRE_CHANNEL_ANNOUNCEMENT')
nodes = l1.rpc.getnodes()['nodes']
assert set([n['nodeid'] for n in nodes]) == set([l1.info['id'], l2.info['id']])
channels = l1.rpc.getchannels()['channels']
assert len(channels) == 2
assert [c['active'] for c in channels] == [True, True]
class LegacyLightningDTests(BaseLightningDTests):
def test_connect(self):