From b7b9f6e4cee262004643e2fe03d56cb47fdbf5c2 Mon Sep 17 00:00:00 2001 From: Antoine Riard Date: Tue, 30 Jul 2019 18:08:03 -0400 Subject: Remove p2pEnabled from Chain interface RPC server starts in warmup mode, it can't process yet calls, then follows connection manager initialization and finally RPC server get out of warmup mode. RPC calls shouldn't be able to get P2P disabled errors because once we initialize g_connman it's not unset until shutdown, after RPC server has been stopped. --- src/interfaces/chain.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/interfaces/chain.cpp') diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp index 1ad4308f2..b8b9ecded 100644 --- a/src/interfaces/chain.cpp +++ b/src/interfaces/chain.cpp @@ -332,7 +332,6 @@ public: LOCK(cs_main); return ::fHavePruned; } - bool p2pEnabled() override { return g_connman != nullptr; } bool isReadyToBroadcast() override { return !::fImporting && !::fReindex && !isInitialBlockDownload(); } bool isInitialBlockDownload() override { return ::ChainstateActive().IsInitialBlockDownload(); } bool shutdownRequested() override { return ShutdownRequested(); } -- cgit v1.2.3