aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/node.cpp
diff options
context:
space:
mode:
authorMacroFake <falke.marco@gmail.com>2022-05-13 12:32:59 +0200
committerMacroFake <falke.marco@gmail.com>2022-05-18 19:15:03 +0200
commitfa9af218780b7960d756db80c57222e5bf2137b1 (patch)
treed2388623573ec1a756aac320555ffa106d42743e /src/rpc/node.cpp
parente016c00e98b8e460c965cab050cb08a4f1a1d6f1 (diff)
downloadbitcoin-fa9af218780b7960d756db80c57222e5bf2137b1.tar.xz
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-
Diffstat (limited to 'src/rpc/node.cpp')
-rw-r--r--src/rpc/node.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/node.cpp b/src/rpc/node.cpp
index 24697a606e..5475662b82 100644
--- a/src/rpc/node.cpp
+++ b/src/rpc/node.cpp
@@ -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)");
}