diff options
author | stickies-v <stickies-v@protonmail.com> | 2024-01-22 15:51:31 +0000 |
---|---|---|
committer | stickies-v <stickies-v@protonmail.com> | 2024-05-07 00:22:28 +0100 |
commit | 1a875d4049574730d4a53a1b68bd29b80ad96d38 (patch) | |
tree | 6b1d4ab798a00babfe2882a2a8a229792a630341 /src/rpc | |
parent | f9ece258aa868d0776caa86b94e71ba05a9b287e (diff) | |
download | bitcoin-1a875d4049574730d4a53a1b68bd29b80ad96d38.tar.xz |
rpc: update min package size error message in submitpackage
Currently, the only allowed package topology has a min size of 2.
Update the error message to reflect that.
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mempool.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/mempool.cpp b/src/rpc/mempool.cpp index a3452c7886..9fa3c32a8f 100644 --- a/src/rpc/mempool.cpp +++ b/src/rpc/mempool.cpp @@ -861,9 +861,9 @@ static RPCHelpMan submitpackage() [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { const UniValue raw_transactions = request.params[0].get_array(); - if (raw_transactions.size() < 1 || raw_transactions.size() > MAX_PACKAGE_COUNT) { + if (raw_transactions.size() < 2 || raw_transactions.size() > MAX_PACKAGE_COUNT) { throw JSONRPCError(RPC_INVALID_PARAMETER, - "Array must contain between 1 and " + ToString(MAX_PACKAGE_COUNT) + " transactions."); + "Array must contain between 2 and " + ToString(MAX_PACKAGE_COUNT) + " transactions."); } std::vector<CTransactionRef> txns; |