aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2022-11-15 21:07:11 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2022-11-16 00:43:07 +0000
commit54b45e155e02cba19975be0bb826ff748d7e895e (patch)
tree572959b207451236b5b668b81f31f90c293f1944 /src/rpc
parent5602cc7ccf4a51ad52dadc495b732f54b43ceb99 (diff)
downloadbitcoin-54b45e155e02cba19975be0bb826ff748d7e895e.tar.xz
RPC/Blockchain: Clarify invalid-action error in scanblocks & scantxoutset
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index bc1028aec3..98257e8b99 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2205,7 +2205,7 @@ static RPCHelpMan scantxoutset()
result.pushKV("unspents", unspents);
result.pushKV("total_amount", ValueFromAmount(total_in));
} else {
- throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid command");
+ throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid action '%s'", request.params[0].get_str()));
}
return result;
},
@@ -2402,7 +2402,7 @@ static RPCHelpMan scanblocks()
ret.pushKV("relevant_blocks", blocks);
}
else {
- throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid command");
+ throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Invalid action '%s'", request.params[0].get_str()));
}
return ret;
},