diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py index 4bae690b3f4..eb1fac5de1a 100755 --- a/test/functional/test_framework/test_node.py +++ b/test/functional/test_framework/test_node.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -# Copyright (c) 2017-2022 The Bitcoin Core developers +# Copyright (c) 2017-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Class for bitcoind node under test""" @@ -209,7 +209,7 @@ class TestNode(): def __getattr__(self, name): """Dispatches any unrecognised messages to the RPC connection or a CLI instance.""" if self.use_cli: - return getattr(RPCOverloadWrapper(self.cli, True), name) + return getattr(RPCOverloadWrapper(self.cli), name) else: assert self.rpc_connected and self.rpc is not None, self._node_msg("Error: no RPC connection") return getattr(RPCOverloadWrapper(self.rpc), name) @@ -374,7 +374,7 @@ class TestNode(): def get_wallet_rpc(self, wallet_name): if self.use_cli: - return RPCOverloadWrapper(self.cli("-rpcwallet={}".format(wallet_name)), True) + return RPCOverloadWrapper(self.cli("-rpcwallet={}".format(wallet_name))) else: assert self.rpc_connected and self.rpc, self._node_msg("RPC not connected") wallet_path = "wallet/{}".format(urllib.parse.quote(wallet_name)) @@ -925,9 +925,8 @@ class TestNodeCLI(): return cli_stdout.rstrip("\n") class RPCOverloadWrapper(): - def __init__(self, rpc, cli=False): + def __init__(self, rpc): self.rpc = rpc - self.is_cli = cli def __getattr__(self, name): return getattr(self.rpc, name)