diff --git a/include/bitcoin/network/p2p.hpp b/include/bitcoin/network/p2p.hpp index 08a556f9b..e3255897d 100644 --- a/include/bitcoin/network/p2p.hpp +++ b/include/bitcoin/network/p2p.hpp @@ -133,6 +133,9 @@ class BCT_API p2p /// Return a reference to the network strand (thread safe). asio::strand& strand() NOEXCEPT; + /// The strand is running in this thread. + bool stranded() const NOEXCEPT; + /// TEMP HACKS. /// ----------------------------------------------------------------------- /// Not thread safe, read from stranded handler only. @@ -213,9 +216,6 @@ class BCT_API p2p virtual void save(const address_cptr& message, count_handler&& complete) NOEXCEPT; - /// The strand is running in this thread. - bool stranded() const NOEXCEPT; - private: code subscribe_close(stop_handler&& handler, object_key key) NOEXCEPT; connectors_ptr create_connectors(size_t count) NOEXCEPT; diff --git a/src/p2p.cpp b/src/p2p.cpp index 0bb78f2eb..99f4b8b5b 100644 --- a/src/p2p.cpp +++ b/src/p2p.cpp @@ -416,7 +416,6 @@ asio::strand& p2p::strand() NOEXCEPT return strand_; } -// protected bool p2p::stranded() const NOEXCEPT { return strand_.running_in_this_thread();