mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 06:10:58 +00:00
fix: repair build against renamed namespaces from develop
develop renamed CamelCase namespaces to snake_case with no compatibility
aliases, so lines this branch added still referenced the old names. The
merge was textually clean because develop never touched those lines, which
left the breakage invisible to git and visible only at compile time.
PeerFinder:: -> peer_finder:: Overlay.h, OverlayImpl.h, MetricMacros.cpp
Tuning:: -> tuning:: PeerImp.cpp (the other call sites in this
file already used the lowercase form)
Two further merge artifacts:
json_value.h develop added `using value_type = Value const` to
ValueConstIterator, and this branch had added
`using value_type = Value` for the same reason, so the merge
kept both and they redefined the alias with different types.
Keep develop's const-qualified type -- correct for an
iterator whose reference is `Value const&` -- and keep only
this branch's iterator_category addition.
InboundLedger.h <string> is no longer used directly by the header, but
five translation units that include it use std::string
without including <string> themselves. Mark it
`IWYU pragma: keep` rather than remove it, matching
suite_list.h.
This commit is contained in:
@@ -629,7 +629,6 @@ public:
|
||||
// this as a Cpp17InputIterator; without them it defaults to output-only,
|
||||
// which breaks standard algorithms (e.g. std::all_of). The iterator walks a
|
||||
// map both ways via ++/--, so it is bidirectional.
|
||||
using value_type = Value;
|
||||
using iterator_category = std::bidirectional_iterator_tag;
|
||||
using reference = Value const&;
|
||||
using pointer = Value const*;
|
||||
|
||||
@@ -1719,7 +1719,7 @@ TEST(MetricMacros, jobq_saturation_gauge_observes_exact_pool_exhaustion_values)
|
||||
// meter, mirroring the production callback shape, because the real
|
||||
// MetricsRegistry's enabled path cannot be linked into this standalone binary
|
||||
// (see the file header). The snapshot types are the REAL xrpl::PeerLedgerSupply
|
||||
// and xrpl::PeerFinder::SlotCensus aggregates, so a field rename or a reorder on
|
||||
// and xrpl::peer_finder::SlotCensus aggregates, so a field rename or a reorder on
|
||||
// either side breaks these tests instead of silently drifting from production.
|
||||
// Both are plain header-only aggregates with no out-of-line members, so using
|
||||
// them here adds no xrpld link dependency.
|
||||
@@ -1889,7 +1889,7 @@ TEST(MetricMacros, slot_census_gauge_names_each_bootstrap_fault_exactly)
|
||||
|
||||
// The real snapshot type the production callback consumes. Outbound is 2 of
|
||||
// 10 with 6 dials in flight; one configured fixed peer is missing.
|
||||
PeerFinder::SlotCensus observed{
|
||||
peer_finder::SlotCensus observed{
|
||||
.outActive = 2,
|
||||
.outMax = 10,
|
||||
.inActive = 0,
|
||||
@@ -1905,7 +1905,7 @@ TEST(MetricMacros, slot_census_gauge_names_each_bootstrap_fault_exactly)
|
||||
"PeerFinder slots, connection attempts and address caches");
|
||||
gauge->AddCallback(
|
||||
[](opentelemetry::metrics::ObserverResult result, void* state) {
|
||||
auto const* self = static_cast<PeerFinder::SlotCensus const*>(state);
|
||||
auto const* self = static_cast<peer_finder::SlotCensus const*>(state);
|
||||
// Same single-label Observe() form the production callback uses.
|
||||
auto observe = [&](char const* field, std::int64_t value) {
|
||||
opentelemetry::nostd::get<opentelemetry::nostd::shared_ptr<
|
||||
@@ -1973,7 +1973,7 @@ TEST(MetricMacros, slot_census_gauge_reports_every_field_even_when_idle)
|
||||
|
||||
// A fresh node with no seed addresses at all: nothing dialled because there
|
||||
// is nothing to dial. Distinct from fault (a), where dials are attempted.
|
||||
PeerFinder::SlotCensus observed{
|
||||
peer_finder::SlotCensus observed{
|
||||
.outActive = 0,
|
||||
.outMax = 10,
|
||||
.inActive = 0,
|
||||
@@ -1989,7 +1989,7 @@ TEST(MetricMacros, slot_census_gauge_reports_every_field_even_when_idle)
|
||||
"PeerFinder slots, connection attempts and address caches");
|
||||
gauge->AddCallback(
|
||||
[](opentelemetry::metrics::ObserverResult result, void* state) {
|
||||
auto const* self = static_cast<PeerFinder::SlotCensus const*>(state);
|
||||
auto const* self = static_cast<peer_finder::SlotCensus const*>(state);
|
||||
auto observe = [&](char const* field, std::int64_t value) {
|
||||
opentelemetry::nostd::get<opentelemetry::nostd::shared_ptr<
|
||||
opentelemetry::metrics::ObserverResultT<std::int64_t>>>(result)
|
||||
@@ -2022,7 +2022,7 @@ TEST(MetricMacros, slot_census_gauge_reports_every_field_even_when_idle)
|
||||
// NEGATIVE: an idle-but-healthy node still reports EVERY field. A zero-valued
|
||||
// field must be a present series, never an absent one -- absence would be
|
||||
// indistinguishable from a dead exporter or a crashed callback.
|
||||
observed = PeerFinder::SlotCensus{
|
||||
observed = peer_finder::SlotCensus{
|
||||
.outActive = 10,
|
||||
.outMax = 10,
|
||||
.inActive = 5,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <mutex>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string> // IWYU pragma: keep
|
||||
#include <string_view>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
@@ -332,7 +332,7 @@ public:
|
||||
*
|
||||
* @return One consistent snapshot of all nine fields.
|
||||
*/
|
||||
[[nodiscard]] virtual PeerFinder::SlotCensus
|
||||
[[nodiscard]] virtual peer_finder::SlotCensus
|
||||
getSlotCensus() = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
*
|
||||
* @return One consistent snapshot of all nine slot/cache fields.
|
||||
*/
|
||||
[[nodiscard]] PeerFinder::SlotCensus
|
||||
[[nodiscard]] peer_finder::SlotCensus
|
||||
getSlotCensus() override
|
||||
{
|
||||
return peerFinder_->getSlotCensus();
|
||||
|
||||
@@ -3722,7 +3722,7 @@ PeerImp::finishServeSpan(
|
||||
auto const served = ledgerData.nodes_size();
|
||||
span.setAttribute(ledger_span::attr::servedNodes, static_cast<std::int64_t>(served));
|
||||
span.setAttribute(
|
||||
ledger_span::attr::outcome, ledger_span::serveOutcome(served, Tuning::kSoftMaxReplyNodes));
|
||||
ledger_span::attr::outcome, ledger_span::serveOutcome(served, tuning::kSoftMaxReplyNodes));
|
||||
// Which ledger was served. Known only once getLedger() succeeded, so it is
|
||||
// read here rather than at span start. Span-only: a per-ledger value as a
|
||||
// metric dimension would mint one series per ledger.
|
||||
|
||||
Reference in New Issue
Block a user