Skip to content

Commit

Permalink
Merge pull request #662 from evoskuil/master
Browse files Browse the repository at this point in the history
Stub in custom channel creator with default allocator.
  • Loading branch information
evoskuil authored Jul 30, 2024
2 parents f3e1d96 + 2675744 commit 76413e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
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

0 comments on commit 76413e3

Please sign in to comment.