mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
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.
This commit is contained in:
parent
590e49ccf2
commit
dd3c8eaa33
1 changed files with 2 additions and 2 deletions
|
@ -750,8 +750,8 @@ static RPCHelpMan listbanned()
|
||||||
{RPCResult::Type::OBJ, "", "",
|
{RPCResult::Type::OBJ, "", "",
|
||||||
{
|
{
|
||||||
{RPCResult::Type::STR, "address", ""},
|
{RPCResult::Type::STR, "address", ""},
|
||||||
{RPCResult::Type::NUM_TIME, "banned_until", ""},
|
|
||||||
{RPCResult::Type::NUM_TIME, "ban_created", ""},
|
{RPCResult::Type::NUM_TIME, "ban_created", ""},
|
||||||
|
{RPCResult::Type::NUM_TIME, "banned_until", ""},
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
RPCExamples{
|
RPCExamples{
|
||||||
|
@ -774,8 +774,8 @@ static RPCHelpMan listbanned()
|
||||||
const CBanEntry& banEntry = entry.second;
|
const CBanEntry& banEntry = entry.second;
|
||||||
UniValue rec(UniValue::VOBJ);
|
UniValue rec(UniValue::VOBJ);
|
||||||
rec.pushKV("address", entry.first.ToString());
|
rec.pushKV("address", entry.first.ToString());
|
||||||
rec.pushKV("banned_until", banEntry.nBanUntil);
|
|
||||||
rec.pushKV("ban_created", banEntry.nCreateTime);
|
rec.pushKV("ban_created", banEntry.nCreateTime);
|
||||||
|
rec.pushKV("banned_until", banEntry.nBanUntil);
|
||||||
|
|
||||||
bannedAddresses.push_back(rec);
|
bannedAddresses.push_back(rec);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue