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

Remove temp hack and restore events::block_archived and chase::checked. #689

Merged
merged 1 commit into from
Oct 25, 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
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
Loading