Skip to content

Commit 3598a1b

Browse files
committed
test: enable --v2transport in combination with --usecli
By renaming the "command" send_cli arg. The old name was unsuitable because the "addnode" RPC has its own "command" arg, leading to ambiguity when included in kwargs. Can be tested with "python3 wallet_multiwallet.py --usecli --v2transport" which fails on master because of this (python throws a TypeError).
1 parent 68a9001 commit 3598a1b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/test_framework/test_node.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -787,15 +787,15 @@ def batch(self, requests):
787787
results.append(dict(error=e))
788788
return results
789789

790-
def send_cli(self, command=None, *args, **kwargs):
790+
def send_cli(self, clicommand=None, *args, **kwargs):
791791
"""Run bitcoin-cli command. Deserializes returned string as python object."""
792792
pos_args = [arg_to_cli(arg) for arg in args]
793793
named_args = [str(key) + "=" + arg_to_cli(value) for (key, value) in kwargs.items()]
794794
p_args = [self.binary, f"-datadir={self.datadir}"] + self.options
795795
if named_args:
796796
p_args += ["-named"]
797-
if command is not None:
798-
p_args += [command]
797+
if clicommand is not None:
798+
p_args += [clicommand]
799799
p_args += pos_args + named_args
800800
self.log.debug("Running bitcoin-cli {}".format(p_args[2:]))
801801
process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)

0 commit comments

Comments
 (0)