View in context in the libbitcoin Slack #general mirror.
bool chaser_validate::process_invalids(const header_links& invalids) NOEXCEPT
{
BC_ASSERT(stranded());
auto& query = archive();
for (const auto& link: invalids)
{
size_t height{};
if (!query.get_height(height, link) ||
!query.set_block_unconfirmable(link))
return false;
invalids_.push_back(link);
notify_block(system::error::invalid_signature, height, link, false);
}
// Set all invalid links in batched_ to terminal (to be skipped).
if (!invalids_.empty())
{
std::ranges::replace_if(batched_, [&](const auto& link) NOEXCEPT
{
return contains(invalids_, link);
}, header_link::terminal);
}
return true;
} (edited)