Browse Source

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 <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
parent
commit
428f5608fa
  1. 13
      tests/test_lightningd.py

13
tests/test_lightningd.py

@ -4060,7 +4060,6 @@ class LightningDTests(BaseLightningDTests):
def test_peerinfo(self): def test_peerinfo(self):
l1, l2 = self.connect() l1, l2 = self.connect()
# Gossiping but no node announcement yet # Gossiping but no node announcement yet
assert l1.rpc.getpeer(l2.info['id'])['state'] == "GOSSIPING" assert l1.rpc.getpeer(l2.info['id'])['state'] == "GOSSIPING"
assert 'alias' not in l1.rpc.getpeer(l2.info['id']) assert 'alias' not in l1.rpc.getpeer(l2.info['id'])
@ -4082,15 +4081,9 @@ class LightningDTests(BaseLightningDTests):
bitcoind.generate_block(100) bitcoind.generate_block(100)
l1.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED') l1.daemon.wait_for_log('WIRE_ONCHAIN_ALL_IRREVOCABLY_RESOLVED')
# Reconnect # The only channel was closed, everybody should have forgotten the nodes
l1.rpc.connect(l2.info['id'], 'localhost', l2.info['port']) assert l1.rpc.listnodes()['nodes'] == []
l1.daemon.wait_for_log('WIRE_GOSSIP_PEER_CONNECTED') assert l2.rpc.listnodes()['nodes'] == []
# 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']
@unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1") @unittest.skipIf(not DEVELOPER, "needs DEVELOPER=1")
def test_blockchaintrack(self): def test_blockchaintrack(self):

Loading…
Cancel
Save