Remove ability to stop routers from gossiping for now

pull/1312/head
Stephen Shelton 4 years ago
parent bdac43e19f
commit aeb0c2be3a
No known key found for this signature in database
GPG Key ID: EE4BADACCE8B631C

@ -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

@ -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

@ -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

@ -10,7 +10,6 @@ namespace llarp
py::class_<AbstractRouter>(mod, "AbstractRouter")
.def("rc", &AbstractRouter::rc)
.def("Stop", &AbstractRouter::Stop)
.def("peerDb", &AbstractRouter::peerDb)
.def("stopGossipingRC", &AbstractRouter::stopGossipingRC);
.def("peerDb", &AbstractRouter::peerDb);
}
} // namespace llarp

Loading…
Cancel
Save