Skip to content

Commit dd3c8ea

Browse files
committed
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.
1 parent 590e49c commit dd3c8ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rpc/net.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,8 @@ static RPCHelpMan listbanned()
750750
{RPCResult::Type::OBJ, "", "",
751751
{
752752
{RPCResult::Type::STR, "address", ""},
753-
{RPCResult::Type::NUM_TIME, "banned_until", ""},
754753
{RPCResult::Type::NUM_TIME, "ban_created", ""},
754+
{RPCResult::Type::NUM_TIME, "banned_until", ""},
755755
}},
756756
}},
757757
RPCExamples{
@@ -774,8 +774,8 @@ static RPCHelpMan listbanned()
774774
const CBanEntry& banEntry = entry.second;
775775
UniValue rec(UniValue::VOBJ);
776776
rec.pushKV("address", entry.first.ToString());
777-
rec.pushKV("banned_until", banEntry.nBanUntil);
778777
rec.pushKV("ban_created", banEntry.nCreateTime);
778+
rec.pushKV("banned_until", banEntry.nBanUntil);
779779

780780
bannedAddresses.push_back(rec);
781781
}

0 commit comments

Comments
 (0)