mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 17:56:49 +00:00
fix: Restore correct behavior for vetoed/obsolete fields and move changelog to Unreleased
- Only set vetoed and obsolete fields for disabled amendments in admin mode - Move API changelog entry from 2.5.0 to Unreleased section - Clarify that both fields are only in admin-mode responses for disabled amendments Agent-Logs-Url: https://github.com/XRPLF/rippled/sessions/5601e141-f680-49d6-84f4-9dd77a369805 Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c5037b0dc6
commit
ffdb36d098
@@ -924,12 +924,19 @@ AmendmentTableImpl::injectJson(
|
||||
v[jss::name] = fs.name;
|
||||
|
||||
v[jss::supported] = fs.supported;
|
||||
v[jss::enabled] = fs.enabled;
|
||||
v[jss::obsolete] = fs.vote == AmendmentVote::obsolete;
|
||||
if (isAdmin)
|
||||
if (!fs.enabled && isAdmin)
|
||||
{
|
||||
v[jss::vetoed] = fs.vote == AmendmentVote::down || fs.vote == AmendmentVote::obsolete;
|
||||
if (fs.vote == AmendmentVote::obsolete)
|
||||
{
|
||||
v[jss::vetoed] = true;
|
||||
v[jss::obsolete] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
v[jss::vetoed] = fs.vote == AmendmentVote::down;
|
||||
}
|
||||
}
|
||||
v[jss::enabled] = fs.enabled;
|
||||
|
||||
if (!fs.enabled && lastVote_ && isAdmin)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user