From df594be80a23ef1309d63e407d9ee198955b02ae Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 25 May 2021 13:33:04 +0930 Subject: [PATCH] pytest: add message check to test_blockheight_disagreement Make sure there was an actual disagreement! Signed-off-by: Rusty Russell --- tests/test_pay.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_pay.py b/tests/test_pay.py index 7b38bb445..007be4a45 100644 --- a/tests/test_pay.py +++ b/tests/test_pay.py @@ -2902,6 +2902,9 @@ def test_blockheight_disagreement(node_factory, bitcoind, executor): # Make sure l1 sends out the HTLC. l1.daemon.wait_for_logs([r'NEW:: HTLC LOCAL']) + height = bitcoind.rpc.getblockchaininfo()['blocks'] + l1.daemon.wait_for_log('Remote node appears to be on a longer chain.*catch up to block {}'.format(height)) + # Unblock l1 from new blocks. l1.daemon.rpcproxy.mock_rpc('getblockhash', None)