View in context in the libbitcoin Slack #general mirror.
void chaser_confirm::do_bumped() NOEXCEPT
{
size_t fork_point{};
const auto& query = archive();
const auto top = query.get_top_confirmed();
auto fork = query.get_validated_fork(fork_point, checkpoint());
if (fork_point > top)
{
fault(error::confirm1);
return;
}
// ADDED THIS CONDITION...
if (fork_point < top)
{
uint256_t work{};
if (!query.get_work(work, fork))
{
fault(error::confirm2);
return;
}
bool strong{};
if (!query.get_strong_fork(strong, work, fork_point))
{
fault(error::confirm3);
return;
}
if (!strong)
return;
}
reorganize(fork, top, fork_point);
} (edited)