From 428f5608fad30de8765f8e1046f15d258b8c9d7f Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Wed, 28 Mar 2018 20:37:47 +0200 Subject: [PATCH] pytest: Testing for a node whose channels were closed will not work In the next commit we remove channels whose outpoint was spent from our network view, so checking for it will not work anymore. Signed-off-by: Christian Decker --- tests/test_lightningd.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/tests/test_lightningd.py b/tests/test_lightningd.py index 8fcebb150..f297bf785 100644 --- a/tests/test_lightningd.py +++ b/tests/test_lightningd.py @@ -4060,7 +4060,6 @@ class LightningDTests(BaseLightningDTests): def test_peerinfo(self): l1, l2 = self.connect() - # Gossiping but no node announcement yet assert l1.rpc.getpeer(l2.info['id'])['state'] == "GOSSIPING" assert 'alias' not in l1.rpc.getpeer(l2.info['id']) @@ -4082,15 +4081,9 @@ class LightningDTests(BaseLightningDTests): bitcoind.generate_block(100) l1.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED') - # Reconnect - l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port']) - l1.daemon.wait_for_log('WIRE_GOSSIP_PEER_CONNECTED') - - # This time we already know about this node. So the node information appears even in - # GOSSIPING state - assert l1.rpc.getpeer(l2.info['id'])['state'] == "GOSSIPING" - assert l1.rpc.getpeer(l2.info['id'])['alias'] == l1.rpc.listnodes(l2.info['id'])['nodes'][0]['alias'] - assert l1.rpc.getpeer(l2.info['id'])['color'] == l1.rpc.listnodes(l2.info['id'])['nodes'][0]['color'] + # The only channel was closed, everybody should have forgotten the nodes + assert l1.rpc.listnodes()['nodes'] == [] + assert l2.rpc.listnodes()['nodes'] == [] @unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1") def test_blockchaintrack(self):