mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 22:15:52 +00:00
Output fee information in server_info.
This commit is contained in:
@@ -1127,7 +1127,17 @@ Json::Value NetworkOPs::getServerInfo()
|
|||||||
if (mConsensus)
|
if (mConsensus)
|
||||||
info["consensus"] = mConsensus->getJson();
|
info["consensus"] = mConsensus->getJson();
|
||||||
|
|
||||||
info["load"] = theApp->getJobQueue().getJson();
|
info["load"] = theApp->getJobQueue().getJson();
|
||||||
|
info["load_base"] = theApp->getFeeTrack().getLoadBase();
|
||||||
|
info["load_fee"] = theApp->getFeeTrack().getLoadFactor();
|
||||||
|
|
||||||
|
Ledger::pointer lpClosed = getClosedLedger();
|
||||||
|
|
||||||
|
if (lpClosed)
|
||||||
|
{
|
||||||
|
info["reserve_base"] = Json::UInt(lpClosed->getReserve(0));
|
||||||
|
info["reserve_inc"] = Json::UInt(lpClosed->getReserveInc());
|
||||||
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
@@ -1468,15 +1478,16 @@ void NetworkOPs::unsubAccountChanges(InfoSub* ispListener)
|
|||||||
// <-- bool: true=added, false=already there
|
// <-- bool: true=added, false=already there
|
||||||
bool NetworkOPs::subLedger(InfoSub* ispListener, Json::Value& jvResult)
|
bool NetworkOPs::subLedger(InfoSub* ispListener, Json::Value& jvResult)
|
||||||
{
|
{
|
||||||
Ledger::pointer closedLgr = getClosedLedger();
|
Ledger::pointer lpClosed = getClosedLedger();
|
||||||
jvResult["ledger_index"] = closedLgr->getLedgerSeq();
|
|
||||||
jvResult["ledger_hash"] = closedLgr->getHash().ToString();
|
|
||||||
jvResult["ledger_time"] = Json::Value::UInt(utFromSeconds(closedLgr->getCloseTimeNC()));
|
|
||||||
|
|
||||||
jvResult["fee_ref"] = Json::UInt(closedLgr->getReferenceFeeUnits());
|
jvResult["ledger_index"] = lpClosed->getLedgerSeq();
|
||||||
jvResult["fee_base"] = Json::UInt(closedLgr->getBaseFee());
|
jvResult["ledger_hash"] = lpClosed->getHash().ToString();
|
||||||
jvResult["reserve_base"] = Json::UInt(closedLgr->getReserve(0));
|
jvResult["ledger_time"] = Json::Value::UInt(utFromSeconds(lpClosed->getCloseTimeNC()));
|
||||||
jvResult["reserve_inc"] = Json::UInt(closedLgr->getReserveInc());
|
|
||||||
|
jvResult["fee_ref"] = Json::UInt(lpClosed->getReferenceFeeUnits());
|
||||||
|
jvResult["fee_base"] = Json::UInt(lpClosed->getBaseFee());
|
||||||
|
jvResult["reserve_base"] = Json::UInt(lpClosed->getReserve(0));
|
||||||
|
jvResult["reserve_inc"] = Json::UInt(lpClosed->getReserveInc());
|
||||||
|
|
||||||
return mSubLedger.insert(ispListener).second;
|
return mSubLedger.insert(ispListener).second;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user