aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJarol Rodriguez <jarolrod@tutanota.com>2021-04-06 17:54:29 -0400
committerJarol Rodriguez <jarolrod@tutanota.com>2021-04-06 18:22:20 -0400
commitdd3c8eaa3399b28dc78a883ff78cbe7cc5c31b5b (patch)
treea39634ec5120cad823f1fdbffa29a96debbe8022 /src
parent590e49ccf2af27c6c1f1e0eb8be3a4bf4d92ce8b (diff)
rpc: swap position of banned_until and ban_created fields
A ban expires after its creation. Therefore, for the listbanned RPC, position banned_until after ban_created in help and output.
Diffstat (limited to 'src')
-rw-r--r--src/rpc/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp
index 96533a50c8..41e5ea1c6c 100644
--- a/src/rpc/net.cpp
+++ b/src/rpc/net.cpp
@@ -750,8 +750,8 @@ static RPCHelpMan listbanned()
{RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::STR, "address", ""},
- {RPCResult::Type::NUM_TIME, "banned_until", ""},
{RPCResult::Type::NUM_TIME, "ban_created", ""},
+ {RPCResult::Type::NUM_TIME, "banned_until", ""},
}},
}},
RPCExamples{
@@ -774,8 +774,8 @@ static RPCHelpMan listbanned()
const CBanEntry& banEntry = entry.second;
UniValue rec(UniValue::VOBJ);
rec.pushKV("address", entry.first.ToString());
- rec.pushKV("banned_until", banEntry.nBanUntil);
rec.pushKV("ban_created", banEntry.nCreateTime);
+ rec.pushKV("banned_until", banEntry.nBanUntil);
bannedAddresses.push_back(rec);
}