Skip to content

Commit

Permalink
always return rpc fee in drops
Browse files Browse the repository at this point in the history
  • Loading branch information
dangell7 committed Oct 5, 2023
1 parent 4e84ad6 commit 587b665
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
25 changes: 5 additions & 20 deletions src/ripple/app/misc/NetworkOPs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2602,26 +2602,11 @@ NetworkOPsImp::getServerInfo(bool human, bool admin, bool counters)
l[jss::seq] = Json::UInt(lpClosed->info().seq);
l[jss::hash] = to_string(lpClosed->info().hash);

if (!human)
{
l[jss::base_fee] = baseFee.jsonClipped();
l[jss::reserve_base] =
lpClosed->fees().accountReserve(0).jsonClipped();
l[jss::reserve_inc] = lpClosed->fees().increment.jsonClipped();
l[jss::close_time] = Json::Value::UInt(
lpClosed->info().closeTime.time_since_epoch().count());
}
else
{
l[jss::base_fee_xrp] = baseFee.decimalXRP();
l[jss::reserve_base_xrp] =
lpClosed->fees().accountReserve(0).decimalXRP();
l[jss::reserve_inc_xrp] = lpClosed->fees().increment.decimalXRP();

if (auto const closeOffset = app_.timeKeeper().closeOffset();
std::abs(closeOffset.count()) >= 60)
l[jss::close_time_offset] =
static_cast<std::uint32_t>(closeOffset.count());
l[jss::base_fee] = baseFee.jsonClipped();
l[jss::reserve_base] = lpClosed->fees().accountReserve(0).jsonClipped();
l[jss::reserve_inc] = lpClosed->fees().increment.jsonClipped();
l[jss::close_time] = Json::Value::UInt(
lpClosed->info().closeTime.time_since_epoch().count());

#if RIPPLED_REPORTING
std::int64_t const dbAge =
Expand Down
4 changes: 2 additions & 2 deletions src/ripple/overlay/impl/OverlayImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,8 @@ OverlayImpl::getServerInfo()
Json::Value& validated_ledger = server_info[jss::validated_ledger];

validated_ledger.removeMember(jss::base_fee);
validated_ledger.removeMember(jss::reserve_base_xrp);
validated_ledger.removeMember(jss::reserve_inc_xrp);
validated_ledger.removeMember(jss::reserve_base);
validated_ledger.removeMember(jss::reserve_inc);
}

return server_info;
Expand Down
5 changes: 0 additions & 5 deletions src/ripple/protocol/jss.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ JSS(balance); // out: AccountLines
JSS(balances); // out: GatewayBalances
JSS(base); // out: LogLevel
JSS(base_fee); // out: NetworkOPs
JSS(base_fee_xrp); // out: NetworkOPs
JSS(bids); // out: Subscribe
JSS(binary); // in: AccountTX, LedgerEntry,
// AccountTxOld, Tx LedgerData
Expand Down Expand Up @@ -228,7 +227,6 @@ JSS(close_time); // in: Application, out: NetworkOPs,
// RCLCxPeerPos, LedgerToJson
JSS(close_time_estimated); // in: Application, out: LedgerToJson
JSS(close_time_human); // out: LedgerToJson
JSS(close_time_offset); // out: NetworkOPs
JSS(close_time_resolution); // in: Application; out: LedgerToJson
JSS(closed); // out: NetworkOPs, LedgerToJson,
// handlers/Ledger
Expand Down Expand Up @@ -555,9 +553,7 @@ JSS(request); // RPC
JSS(requested); // out: Manifest
JSS(reservations); // out: Reservations
JSS(reserve_base); // out: NetworkOPs
JSS(reserve_base_xrp); // out: NetworkOPs
JSS(reserve_inc); // out: NetworkOPs
JSS(reserve_inc_xrp); // out: NetworkOPs
JSS(response); // websocket
JSS(result); // RPC
JSS(ripple_lines); // out: NetworkOPs
Expand Down Expand Up @@ -618,7 +614,6 @@ JSS(subcommand); // in: PathFind
JSS(success); // rpc
JSS(supported); // out: AmendmentTableImpl
JSS(sync_mode); // in: Submit
JSS(system_time_offset); // out: NetworkOPs
JSS(tag); // out: Peers
JSS(taker); // in: Subscribe, BookOffers
JSS(taker_gets); // in: Subscribe, Unsubscribe, BookOffers
Expand Down

0 comments on commit 587b665

Please sign in to comment.