mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-12 22:29:33 +02:00
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).
This commit is contained in:
parent
68a9001751
commit
3598a1b5c9
@ -787,15 +787,15 @@ class TestNodeCLI():
|
||||
results.append(dict(error=e))
|
||||
return results
|
||||
|
||||
def send_cli(self, command=None, *args, **kwargs):
|
||||
def send_cli(self, clicommand=None, *args, **kwargs):
|
||||
"""Run bitcoin-cli command. Deserializes returned string as python object."""
|
||||
pos_args = [arg_to_cli(arg) for arg in args]
|
||||
named_args = [str(key) + "=" + arg_to_cli(value) for (key, value) in kwargs.items()]
|
||||
p_args = [self.binary, f"-datadir={self.datadir}"] + self.options
|
||||
if named_args:
|
||||
p_args += ["-named"]
|
||||
if command is not None:
|
||||
p_args += [command]
|
||||
if clicommand is not None:
|
||||
p_args += [clicommand]
|
||||
p_args += pos_args + named_args
|
||||
self.log.debug("Running bitcoin-cli {}".format(p_args[2:]))
|
||||
process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user