From 5096cb7f41730e308c56e5591b80fc287fdd664c Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 15 Jun 2023 16:37:14 -0700 Subject: [PATCH] Cache messages::block size. --- include/bitcoin/network/p2p.hpp | 10 +++++----- src/p2p.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/bitcoin/network/p2p.hpp b/include/bitcoin/network/p2p.hpp index 0db4302a4..f07b7ffce 100644 --- a/include/bitcoin/network/p2p.hpp +++ b/include/bitcoin/network/p2p.hpp @@ -178,6 +178,11 @@ class BCT_API p2p return session; } + virtual void do_start(const result_handler& handler) NOEXCEPT; + virtual void do_run(const result_handler& handler) NOEXCEPT; + virtual void do_close() NOEXCEPT; + virtual bool closed() const NOEXCEPT; + /// Override to attach specialized sessions, require strand. virtual session_seed::ptr attach_seed_session() NOEXCEPT; virtual session_manual::ptr attach_manual_session() NOEXCEPT; @@ -216,14 +221,9 @@ class BCT_API p2p connectors_ptr create_connectors(size_t count) NOEXCEPT; object_key create_key() NOEXCEPT; - virtual bool closed() const NOEXCEPT; virtual code start_hosts() NOEXCEPT; virtual code stop_hosts() NOEXCEPT; - void do_start(const result_handler& handler) NOEXCEPT; - void do_run(const result_handler& handler) NOEXCEPT; - void do_close() NOEXCEPT; - void handle_start(const code& ec, const result_handler& handler) NOEXCEPT; void handle_run(const code& ec, const result_handler& handler) NOEXCEPT; diff --git a/src/p2p.cpp b/src/p2p.cpp index 4f9e1b1eb..5527c4761 100644 --- a/src/p2p.cpp +++ b/src/p2p.cpp @@ -375,7 +375,7 @@ void p2p::do_connect_handled(const config::endpoint& endpoint, // Properties. // ---------------------------------------------------------------------------- -// private +// protected bool p2p::closed() const NOEXCEPT { return closed_.load();