fix: Peer crawler port field type inconsistency (#6318)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: mvadari <8029314+mvadari@users.noreply.github.com>
Co-authored-by: Mayukha Vadari <mvadari@gmail.com>
Co-authored-by: Mayukha Vadari <mvadari@ripple.com>
Co-authored-by: Bart <bthomee@users.noreply.github.com>
This commit is contained in:
Copilot
2026-03-17 18:03:56 -04:00
committed by Ed Hennis
parent 543e6f35e1
commit fbab9e2687
3 changed files with 50 additions and 4 deletions

View File

@@ -721,13 +721,13 @@ 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())
@@ -740,7 +740,7 @@ OverlayImpl::getOverlayInfo()
}
else
{
pv[jss::port] = std::to_string(sp->getRemoteAddress().port());
pv[jss::port] = sp->getRemoteAddress().port();
}
}