From 78411c674d979e2e32a4fb51109544686de2eebe Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:53:39 +0100 Subject: [PATCH] fix(core): drop the unused Config forward declaration from HashRouter.h HashRouter.h declared `class Config;` and never referred to it: the only other mentions of the name in the file are two prose comments. Nothing that includes this header depends on it either -- of the eighteen files that do, the only one that names the type needs the full definition and includes it itself. The declaration is vestigial, left behind when setupHashRouter() moved to setup_HashRouter.h, which carries its own. Left alone it is now an error rather than dead code. This branch's SlotCensus work made Overlay.h include PeerfinderManager.h, because Overlay::slotCensus() returns a SlotCensus by value. ValidatorList.cpp includes both Overlay.h and HashRouter.h, and is the one translation unit that reaches them without also pulling in xrpld/core/Config.h -- so PeerFinder::Config and this declaration meet there, and bugprone-forward-declaration-namespace reports a declaration with no definition beside a same-named class in another namespace. Removing it rather than including the real header: xrpl::Config lives in xrpld, so an include would point the xrpl.libxrpl.core layer at the layer above it. --- include/xrpl/core/HashRouter.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/xrpl/core/HashRouter.h b/include/xrpl/core/HashRouter.h index 20aafecc5f..58fa9d1432 100644 --- a/include/xrpl/core/HashRouter.h +++ b/include/xrpl/core/HashRouter.h @@ -73,8 +73,6 @@ any(HashRouterFlags flags) return static_cast>(flags) != 0; } -class Config; - /** * Routing table for objects identified by hash. *