From d1ca56382512df3084fce7353bf1e8b66cae61bc Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Fri, 2 Dec 2022 17:53:58 -0500 Subject: [PATCH] bitcoin-cli: Make it an error to specify the "args" parameter two different ways MarcoFalke reported the case of positional arguments silently overwriting the named "args" parameter in bitcoin-cli https://github.com/bitcoin/bitcoin/pull/19762#discussion_r1035761471 and this behavior is confusing and was not intended when support for "args" parameters was added to bitcoin-cli in #19762. Instead of letting one "args" value overwrite the other in the client, just pass the values to the server verbatim, and let the error be handled server side. --- src/rpc/client.cpp | 8 +++++++- test/functional/interface_bitcoin_cli.py | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/rpc/client.cpp b/src/rpc/client.cpp index b3434b80c7b..ea094976bf8 100644 --- a/src/rpc/client.cpp +++ b/src/rpc/client.cpp @@ -289,6 +289,9 @@ UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector