Skip to content

Commit

Permalink
Fix revoke reason check for ProUpRevTx (#2787)
Browse files Browse the repository at this point in the history
  • Loading branch information
gladcow authored and codablock committed Apr 4, 2019
1 parent 35914e0 commit b52d0ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rpc/rpcevo.cpp
Expand Up @@ -762,7 +762,7 @@ UniValue protx_revoke(const JSONRPCRequest& request)

if (request.params.size() > 3) {
int32_t nReason = ParseInt32V(request.params[3], "reason");
if (nReason < 0 || nReason >= CProUpRevTx::REASON_LAST) {
if (nReason < 0 || nReason > CProUpRevTx::REASON_LAST) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("invalid reason %d, must be between 0 and %d", nReason, CProUpRevTx::REASON_LAST));
}
ptx.nReason = (uint16_t)nReason;
Expand Down

0 comments on commit b52d0ad

Please sign in to comment.