Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undo API changes introduced in XRPFees: #4429

Merged
merged 3 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/ripple/app/misc/NetworkOPs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2184,16 +2184,15 @@ NetworkOPsImp::pubValidation(std::shared_ptr<STValidation> const& val)
// simplifies later operations)
if (auto const baseFeeXRP = ~val->at(~sfBaseFeeDrops);
baseFeeXRP && baseFeeXRP->native())
jvObj[jss::base_fee_drops] = baseFeeXRP->xrp().jsonClipped();
jvObj[jss::base_fee] = baseFeeXRP->xrp().jsonClipped();

if (auto const reserveBaseXRP = ~val->at(~sfReserveBaseDrops);
reserveBaseXRP && reserveBaseXRP->native())
jvObj[jss::reserve_base_drops] =
reserveBaseXRP->xrp().jsonClipped();
jvObj[jss::reserve_base] = reserveBaseXRP->xrp().jsonClipped();

if (auto const reserveIncXRP = ~val->at(~sfReserveIncrementDrops);
reserveIncXRP && reserveIncXRP->native())
jvObj[jss::reserve_inc_drops] = reserveIncXRP->xrp().jsonClipped();
jvObj[jss::reserve_inc] = reserveIncXRP->xrp().jsonClipped();

for (auto i = mStreamMaps[sValidations].begin();
i != mStreamMaps[sValidations].end();)
Expand Down
3 changes: 0 additions & 3 deletions src/ripple/protocol/jss.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ JSS(balance); // out: AccountLines
JSS(balances); // out: GatewayBalances
JSS(base); // out: LogLevel
JSS(base_fee); // out: NetworkOPs
JSS(base_fee_drops); // out: NetworkOPs
JSS(base_fee_xrp); // out: NetworkOPs
JSS(bids); // out: Subscribe
JSS(binary); // in: AccountTX, LedgerEntry,
Expand Down Expand Up @@ -496,10 +495,8 @@ JSS(request); // RPC
JSS(requested); // out: Manifest
JSS(reservations); // out: Reservations
JSS(reserve_base); // out: NetworkOPs
JSS(reserve_base_drops); // out: NetworkOPs
JSS(reserve_base_xrp); // out: NetworkOPs
JSS(reserve_inc); // out: NetworkOPs
JSS(reserve_inc_drops); // out: NetworkOPs
JSS(reserve_inc_xrp); // out: NetworkOPs
JSS(response); // websocket
JSS(result); // RPC
Expand Down
18 changes: 2 additions & 16 deletions src/test/rpc/Subscribe_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,24 +412,10 @@ class Subscribe_test : public beast::unit_test::suite
return false;

bool xrpFees = env.closed()->rules().enabled(featureXRPFees);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This variable is no longer used.

if ((!xrpFees &&
jv.isMember(jss::reserve_base) != isFlagLedger) ||
(xrpFees && jv.isMember(jss::reserve_base)))
if (jv.isMember(jss::reserve_base) != isFlagLedger)
return false;

if ((!xrpFees &&
jv.isMember(jss::reserve_inc) != isFlagLedger) ||
(xrpFees && jv.isMember(jss::reserve_inc)))
return false;

if ((xrpFees &&
jv.isMember(jss::reserve_base_drops) != isFlagLedger) ||
(!xrpFees && jv.isMember(jss::reserve_base_drops)))
return false;

if ((xrpFees &&
jv.isMember(jss::reserve_inc_drops) != isFlagLedger) ||
(!xrpFees && jv.isMember(jss::reserve_inc_drops)))
if (jv.isMember(jss::reserve_inc) != isFlagLedger)
return false;

return true;
Expand Down