Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stub in custom channel creator with default allocator. #662

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/protocols/protocol_block_in_31800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ bool protocol_block_in_31800::handle_receive_block(const code& ec,
notify(ec, chase::checked, height);
fire(events::block_archived, height);

count(message->cached_size);
count(size);
map_->erase(it);
if (is_idle())
{
Expand Down
Loading