Skip to content

Commit

Permalink
Cache messages::block size.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jun 15, 2023
1 parent a26e10c commit 5096cb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/bitcoin/network/p2p.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/p2p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ void p2p::do_connect_handled(const config::endpoint& endpoint,
// Properties.
// ----------------------------------------------------------------------------

// private
// protected
bool p2p::closed() const NOEXCEPT
{
return closed_.load();
Expand Down

0 comments on commit 5096cb7

Please sign in to comment.