mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 23:03:45 +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:
@@ -12,9 +12,9 @@
|
||||
static const char* BANMAN_JSON_VERSION_KEY{"version"};
|
||||
|
||||
CBanEntry::CBanEntry(const UniValue& json)
|
||||
: nVersion(json[BANMAN_JSON_VERSION_KEY].get_int()),
|
||||
nCreateTime(json["ban_created"].get_int64()),
|
||||
nBanUntil(json["banned_until"].get_int64())
|
||||
: nVersion(json[BANMAN_JSON_VERSION_KEY].getInt<int>()),
|
||||
nCreateTime(json["ban_created"].getInt<int64_t>()),
|
||||
nBanUntil(json["banned_until"].getInt<int64_t>())
|
||||
{
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ UniValue BanMapToJson(const banmap_t& bans)
|
||||
void BanMapFromJson(const UniValue& bans_json, banmap_t& bans)
|
||||
{
|
||||
for (const auto& ban_entry_json : bans_json.getValues()) {
|
||||
const int version{ban_entry_json[BANMAN_JSON_VERSION_KEY].get_int()};
|
||||
const int version{ban_entry_json[BANMAN_JSON_VERSION_KEY].getInt<int>()};
|
||||
if (version != CBanEntry::CURRENT_VERSION) {
|
||||
LogPrintf("Dropping entry with unknown version (%s) from ban list\n", version);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user