Skip to content

Commit

Permalink
Remove temp hack and restore events::block_archived and chase::checked.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Oct 25, 2024
1 parent 38df07b commit e420cf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
4 changes: 0 additions & 4 deletions include/bitcoin/node/protocols/protocol_block_in_31800.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ class BCN_API protocol_block_in_31800
private:
using type_id = network::messages::inventory::type_id;

// HACK
void complete(const code& ec, const system::chain::block::cptr& block,
size_t height) const NOEXCEPT;

code check(const system::chain::block& block,
const system::chain::context& ctx, bool bypass) const NOEXCEPT;

Expand Down
17 changes: 2 additions & 15 deletions src/protocols/protocol_block_in_31800.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,8 @@ bool protocol_block_in_31800::handle_receive_block(const code& ec,
LOGP("Downloaded block [" << encode_hash(hash) << ":" << height
<< "] from [" << authority() << "].");

////notify(ec, chase::checked, height);
////fire(events::block_archived, height);
notify(ec, chase::checked, height);
fire(events::block_archived, height);

count(size);
map_->erase(it);
Expand All @@ -384,19 +384,6 @@ bool protocol_block_in_31800::handle_receive_block(const code& ec,
return true;
}

void protocol_block_in_31800::complete(const code& ec,
const chain::block::cptr& block, size_t height) const NOEXCEPT
{
if (block->is_valid())
{
////const auto wire = block->serialized_size(true);
////const auto allocated = block->get_allocation();
////const auto ratio = static_cast<size_t>((100.0 * allocated) / wire);
notify(ec, chase::checked, height);
fire(events::block_archived, height);
}
}

// Header state is checked by organize.
code protocol_block_in_31800::check(const chain::block& block,
const chain::context& ctx, bool bypass) const NOEXCEPT
Expand Down

0 comments on commit e420cf7

Please sign in to comment.