mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
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.
This commit is contained in:
@@ -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(); }
|
||||
|
||||
@@ -187,9 +187,6 @@ public:
|
||||
//! Check if any block has been pruned.
|
||||
virtual bool havePruned() = 0;
|
||||
|
||||
//! Check if p2p enabled.
|
||||
virtual bool p2pEnabled() = 0;
|
||||
|
||||
//! Check if the node is ready to broadcast transactions.
|
||||
virtual bool isReadyToBroadcast() = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user