From 5b45334d9321048fcc0be6e3d0af404e63bdecf4 Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Wed, 29 Jul 2020 19:36:15 +0200 Subject: [PATCH] pyln: allow to signal may_fail in get_node() This or `expect_fail`, as it implies that, well, the node may fail. Signed-off-by: Antoine Poinsot --- contrib/pyln-testing/pyln/testing/utils.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/pyln-testing/pyln/testing/utils.py b/contrib/pyln-testing/pyln/testing/utils.py index 983019f13..bbc7e80c9 100644 --- a/contrib/pyln-testing/pyln/testing/utils.py +++ b/contrib/pyln-testing/pyln/testing/utils.py @@ -1026,8 +1026,8 @@ class NodeFactory(object): def get_node(self, node_id=None, options=None, dbfile=None, feerates=(15000, 11000, 7500, 3750), start=True, - wait_for_bitcoind_sync=True, expect_fail=False, - cleandir=True, **kwargs): + wait_for_bitcoind_sync=True, may_fail=False, + expect_fail=False, cleandir=True, **kwargs): node_id = self.get_node_id() if not node_id else node_id port = self.get_next_port() @@ -1043,7 +1043,8 @@ class NodeFactory(object): db = self.db_provider.get_db(os.path.join(lightning_dir, TEST_NETWORK), self.testname, node_id) node = self.node_cls( node_id, lightning_dir, self.bitcoind, self.executor, db=db, - port=port, options=options, **kwargs + port=port, options=options, may_fail=may_fail or expect_fail, + **kwargs ) # Regtest estimatefee are unusable, so override.