diff --git a/src/httpserver.cpp b/src/httpserver.cpp index 63639fa3e..d17667223 100644 --- a/src/httpserver.cpp +++ b/src/httpserver.cpp @@ -139,15 +139,15 @@ struct HTTPPathHandler //! libevent event loop static struct event_base* eventBase = nullptr; //! HTTP server -struct evhttp* eventHTTP = nullptr; +static struct evhttp* eventHTTP = nullptr; //! List of subnets to allow RPC connections from static std::vector rpc_allow_subnets; //! Work queue for handling longer requests off the event loop thread static WorkQueue* workQueue = nullptr; //! Handlers for (sub)paths -std::vector pathHandlers; +static std::vector pathHandlers; //! Bound listening sockets -std::vector boundSockets; +static std::vector boundSockets; /** Check if a network address is allowed to access the HTTP server */ static bool ClientAllowed(const CNetAddr& netaddr) @@ -420,7 +420,7 @@ bool UpdateHTTPServerLogging(bool enable) { #endif } -std::thread threadHTTP; +static std::thread threadHTTP; static std::vector g_thread_http_workers; void StartHTTPServer() diff --git a/src/init.cpp b/src/init.cpp index b4b4ccb65..2bb270647 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -74,7 +74,7 @@ #include #endif -bool fFeeEstimatesInitialized = false; +static bool fFeeEstimatesInitialized = false; static const bool DEFAULT_PROXYRANDOMIZE = true; static const bool DEFAULT_REST_ENABLE = false; static const bool DEFAULT_STOPAFTERBLOCKIMPORT = false; diff --git a/src/warnings.cpp b/src/warnings.cpp index 1c6ba13f6..8ac9ee09d 100644 --- a/src/warnings.cpp +++ b/src/warnings.cpp @@ -8,10 +8,10 @@ #include #include -CCriticalSection cs_warnings; -std::string strMiscWarning GUARDED_BY(cs_warnings); -bool fLargeWorkForkFound GUARDED_BY(cs_warnings) = false; -bool fLargeWorkInvalidChainFound GUARDED_BY(cs_warnings) = false; +static RecursiveMutex cs_warnings; +static std::string strMiscWarning GUARDED_BY(cs_warnings); +static bool fLargeWorkForkFound GUARDED_BY(cs_warnings) = false; +static bool fLargeWorkInvalidChainFound GUARDED_BY(cs_warnings) = false; void SetMiscWarning(const std::string& strWarning) {