Compare commits

...

3 Commits

Author SHA1 Message Date
Mayukha Vadari
aea548b2b9 fix API changelog 2026-02-03 11:36:54 -05:00
copilot-swe-agent[bot]
f4e1f71b7a Fix peer crawler port field type inconsistency
- Change outbound peer port from string to integer in getOverlayInfo()
- Add "active", "in", "out" JSS constants to jss.h
- Update API-CHANGELOG.md with bugfix note

Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
2026-02-03 11:21:30 -05:00
copilot-swe-agent[bot]
136ec1ca9e Initial plan 2026-02-03 11:21:30 -05:00
3 changed files with 12 additions and 3 deletions

View File

@@ -22,6 +22,12 @@ API version 2 is available in `rippled` version 2.0.0 and later. See [API-VERSIO
This version is supported by all `rippled` versions. For WebSocket and HTTP JSON-RPC requests, it is currently the default API version used when no `api_version` is specified.
## Unreleased
### Bugfixes
- Peer Crawler: The `port` field in `overlay.active[]` now consistently returns an integer instead of a string for outbound peers. [#6318](https://github.com/XRPLF/rippled/pull/6318)
## XRP Ledger server version 3.1.0
[Version 3.1.0](https://github.com/XRPLF/rippled/releases/tag/3.1.0) was released on Jan 27, 2026.

View File

@@ -112,6 +112,7 @@ JSS(accounts); // in: LedgerEntry, Subscribe,
// handlers/Ledger, Unsubscribe
JSS(accounts_proposed); // in: Subscribe, Unsubscribe
JSS(action);
JSS(active); // out: OverlayImpl
JSS(acquiring); // out: LedgerRequest
JSS(address); // out: PeerImp
JSS(affected); // out: AcceptedLedgerTx
@@ -299,6 +300,7 @@ JSS(id); // websocket.
JSS(ident); // in: AccountCurrencies, AccountInfo,
// OwnerInfo
JSS(ignore_default); // in: AccountLines
JSS(in); // out: OverlayImpl
JSS(inLedger); // out: tx/Transaction
JSS(inbound); // out: PeerImp
JSS(index); // in: LedgerEntry
@@ -460,6 +462,7 @@ JSS(open_ledger_fee); // out: TxQ
JSS(open_ledger_level); // out: TxQ
JSS(oracles); // in: get_aggregate_price
JSS(oracle_document_id); // in: get_aggregate_price
JSS(out); // out: OverlayImpl
JSS(owner); // in: LedgerEntry, out: NetworkOPs
JSS(owner_funds); // in/out: Ledger, NetworkOPs, AcceptedLedgerTx
JSS(page_index);

View File

@@ -630,12 +630,12 @@ OverlayImpl::getOverlayInfo()
{
using namespace std::chrono;
Json::Value jv;
auto& av = jv["active"] = Json::Value(Json::arrayValue);
auto& av = jv[jss::active] = Json::Value(Json::arrayValue);
for_each([&](std::shared_ptr<PeerImp>&& sp) {
auto& pv = av.append(Json::Value(Json::objectValue));
pv[jss::public_key] = base64_encode(sp->getNodePublic().data(), sp->getNodePublic().size());
pv[jss::type] = sp->slot()->inbound() ? "in" : "out";
pv[jss::type] = sp->slot()->inbound() ? jss::in : jss::out;
pv[jss::uptime] = static_cast<std::uint32_t>(duration_cast<seconds>(sp->uptime()).count());
if (sp->crawl())
{
@@ -647,7 +647,7 @@ OverlayImpl::getOverlayInfo()
}
else
{
pv[jss::port] = std::to_string(sp->getRemoteAddress().port());
pv[jss::port] = sp->getRemoteAddress().port();
}
}