mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
rpc: Reject empty txids in gettxoutproof
This commit is contained in:
@@ -245,6 +245,9 @@ static RPCHelpMan gettxoutproof()
|
||||
{
|
||||
std::set<uint256> setTxids;
|
||||
UniValue txids = request.params[0].get_array();
|
||||
if (txids.empty()) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "Parameter 'txids' cannot be empty");
|
||||
}
|
||||
for (unsigned int idx = 0; idx < txids.size(); idx++) {
|
||||
auto ret = setTxids.insert(ParseHashV(txids[idx], "txid"));
|
||||
if (!ret.second) {
|
||||
|
||||
Reference in New Issue
Block a user