diff --git a/llarp/router/abstractrouter.hpp b/llarp/router/abstractrouter.hpp index 211c18634..f53c2917a 100644 --- a/llarp/router/abstractrouter.hpp +++ b/llarp/router/abstractrouter.hpp @@ -81,10 +81,6 @@ namespace llarp tooling::RouterHive* hive = nullptr; #endif - // XXX / TODO: this code shouldn't ever make it into a release binary - virtual void - stopGossipingRC() = 0; - virtual ~AbstractRouter() = default; virtual bool diff --git a/llarp/router/router.cpp b/llarp/router/router.cpp index 9a8034a9e..6589660a5 100644 --- a/llarp/router/router.cpp +++ b/llarp/router/router.cpp @@ -125,7 +125,7 @@ namespace llarp void Router::GossipRCIfNeeded(const RouterContact rc) { - if (not m_shouldGossipRC) + if (disableGossipingRC_TestingOnly()) return; /// if we are not a service node forget about gossip diff --git a/llarp/router/router.hpp b/llarp/router/router.hpp index db393c073..5af8c6b38 100644 --- a/llarp/router/router.hpp +++ b/llarp/router/router.hpp @@ -51,13 +51,6 @@ namespace llarp { struct Router final : public AbstractRouter { - // XXX / TODO: this code shouldn't ever make it into a release binary - virtual void - stopGossipingRC() - { - m_shouldGossipRC = false; - } - bool m_shouldGossipRC = true; llarp_time_t _lastPump = 0s; bool ready; @@ -536,6 +529,13 @@ namespace llarp void MessageSent(const RouterID& remote, SendStatus status); + + protected: + virtual bool + disableGossipingRC_TestingOnly() + { + return false; + }; }; } // namespace llarp diff --git a/pybind/llarp/router.cpp b/pybind/llarp/router.cpp index 8dcedc6a4..7531c27c5 100644 --- a/pybind/llarp/router.cpp +++ b/pybind/llarp/router.cpp @@ -10,7 +10,6 @@ namespace llarp py::class_(mod, "AbstractRouter") .def("rc", &AbstractRouter::rc) .def("Stop", &AbstractRouter::Stop) - .def("peerDb", &AbstractRouter::peerDb) - .def("stopGossipingRC", &AbstractRouter::stopGossipingRC); + .def("peerDb", &AbstractRouter::peerDb); } } // namespace llarp