mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
testing: make sure we don't see gossip in bad order.
This is something which generally shouldn't happen, but we didn't notice it previously. We ignore this warning in the case where a channel was deleted: this happens because one side can send an update while the other notices that the channel is closed. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
177a1fc88e
commit
8ee60e2d8e
@@ -91,6 +91,10 @@ def node_factory(directory, test_name, bitcoind, executor):
|
||||
err_count += checkReconnect(node)
|
||||
if err_count:
|
||||
raise ValueError("{} nodes had unexpected reconnections".format(err_count))
|
||||
for node in nf.nodes:
|
||||
err_count += checkBadGossipOrder(node)
|
||||
if err_count:
|
||||
raise ValueError("{} nodes had bad gossip order".format(err_count))
|
||||
|
||||
if not ok:
|
||||
raise Exception("At least one lightning exited with unexpected non-zero return code")
|
||||
@@ -147,6 +151,12 @@ def checkReconnect(node):
|
||||
return 0
|
||||
|
||||
|
||||
def checkBadGossipOrder(node):
|
||||
if node.daemon.is_in_log('Bad gossip order') and not node.daemon.is_in_log('Deleting channel'):
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def executor():
|
||||
ex = futures.ThreadPoolExecutor(max_workers=20)
|
||||
|
||||
Reference in New Issue
Block a user