Skip to content

Commit

Permalink
Comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Feb 27, 2024
1 parent d630ca8 commit a4e4478
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/protocols/protocol_block_in.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@ get_blocks protocol_block_in::create_get_inventory(
get_data protocol_block_in::create_get_data(
const inventory& message) const NOEXCEPT
{
get_data getter{};
getter.items.reserve(message.count(type_id::block));

// clang emplace_back bug (no matching constructor), using push_back.
// bip144: get_data uses witness constant but inventory does not.

get_data getter{};
getter.items.reserve(message.count(type_id::block));
for (const auto& item: message.items)
if ((item.type == type_id::block) && !archive().is_block(item.hash))
getter.items.push_back({ block_type_, item.hash });
Expand Down
6 changes: 3 additions & 3 deletions src/protocols/protocol_block_in_31800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ bool protocol_block_in_31800::handle_receive_block(const code& ec,
get_data protocol_block_in_31800::create_get_data(
const chaser_check::map& map) const NOEXCEPT
{
get_data getter{};
getter.items.reserve(map.size());

// clang emplace_back bug (no matching constructor), using push_back.
// bip144: get_data uses witness constant but inventory does not.

get_data getter{};
getter.items.reserve(map.size());
for (const auto& item: map)
getter.items.push_back({ block_type_, item.first });

Expand Down

0 comments on commit a4e4478

Please sign in to comment.