mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
scripted-diff: Use getInt<T> over get_int/get_int64
-BEGIN VERIFY SCRIPT- sed -i 's|\<get_int64\>|getInt<int64_t>|g' $(git grep -l get_int ':(exclude)src/univalue') sed -i 's|\<get_int\>|getInt<int>|g' $(git grep -l get_int ':(exclude)src/univalue') -END VERIFY SCRIPT-
This commit is contained in:
@@ -53,7 +53,7 @@ static RPCHelpMan setmocktime()
|
||||
LOCK(cs_main);
|
||||
|
||||
RPCTypeCheck(request.params, {UniValue::VNUM});
|
||||
const int64_t time{request.params[0].get_int64()};
|
||||
const int64_t time{request.params[0].getInt<int64_t>()};
|
||||
if (time < 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime cannot be negative: %s.", time));
|
||||
}
|
||||
@@ -108,7 +108,7 @@ static RPCHelpMan mockscheduler()
|
||||
|
||||
// check params are valid values
|
||||
RPCTypeCheck(request.params, {UniValue::VNUM});
|
||||
int64_t delta_seconds = request.params[0].get_int64();
|
||||
int64_t delta_seconds = request.params[0].getInt<int64_t>();
|
||||
if (delta_seconds <= 0 || delta_seconds > 3600) {
|
||||
throw std::runtime_error("delta_time must be between 1 and 3600 seconds (1 hr)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user