Skip to content

Commit

Permalink
Stub in custom channel creator with default allocator.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jul 28, 2024
1 parent 1c87b0c commit 2675744
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/bitcoin/node/sessions/attach.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ class attach
channel->attach<protocol_transaction_out>(self)->start();
channel->attach<protocol_observer>(self)->start();
}

network::channel::ptr create_channel(const network::socket::ptr& socket,
bool quiet) NOEXCEPT override
{
// TODO: replace message memory resource (affects only block messages).
static network::memory memory{};

// Channel id must be created using create_key().
const auto id = network::session::create_key();
return std::make_shared<network::channel>(memory, network::session::log,
socket, network::session::settings(), id, quiet);
}
};

} // namespace node
Expand Down

0 comments on commit 2675744

Please sign in to comment.