change error message

This commit is contained in:
Alfredo Garcia 2022-04-08 13:24:11 -03:00
parent 2c13a41334
commit a4f563f2ab
2 changed files with 3 additions and 3 deletions

View File

@ -825,7 +825,7 @@ static void getHeightRange(const UniValue& params, int& start, int& end)
}
if (end < start) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY,
"End value is expected to be greater than start");
"End value is expected to be greater or equal than start");
}
}
}

View File

@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE(rpc_insightexplorer)
CheckRPCThrows("getaddressdeltas {\"addresses\":[],\"start\":0,\"end\":0,\"chainInfo\":true}",
"Start and end are expected to be greater than zero");
CheckRPCThrows("getaddressdeltas {\"addresses\":[],\"start\":3,\"end\":2,\"chainInfo\":true}",
"End value is expected to be greater than start");
"End value is expected to be greater or equal than start");
// in this test environment, only the genesis block (0) exists
CheckRPCThrows("getaddressdeltas {\"addresses\":[],\"start\":2,\"end\":3,\"chainInfo\":true}",
"Start or end is outside chain range");
@ -377,7 +377,7 @@ BOOST_AUTO_TEST_CASE(rpc_insightexplorer)
CheckRPCThrows("getaddresstxids {\"addresses\":[],\"start\":0,\"end\":0,\"chainInfo\":true}",
"Start and end are expected to be greater than zero");
CheckRPCThrows("getaddresstxids {\"addresses\":[],\"start\":3,\"end\":2,\"chainInfo\":true}",
"End value is expected to be greater than start");
"End value is expected to be greater or equal than start");
// in this test environment, only the genesis block (0) exists
CheckRPCThrows("getaddresstxids {\"addresses\":[],\"start\":2,\"end\":3,\"chainInfo\":true}",
"Start or end is outside chain range");