Skip to content
Merged
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
17 changes: 1 addition & 16 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,24 +132,9 @@ void chaser_validate::do_checked(height_t height) NOEXCEPT
void chaser_validate::do_bump(height_t) NOEXCEPT
{
BC_ASSERT(stranded());
const auto& query = archive();

// TODO: make store query?

// Only necessary when bumping as next position may not be associated.
const auto height = add1(position());
const auto link = query.to_candidate(height);
const auto ec = query.get_block_state(link);

// First block state should be unvalidated, valid, or confirmable. This is
// assured in do_checked by chasing block checks. unknown_state is a reset.
const auto ready =
(ec == database::error::unvalidated) ||
(ec == database::error::block_valid) ||
(ec == database::error::unknown_state) ||
(ec == database::error::block_confirmable);

if (ready)
if (archive().is_validateable(height))
do_bumped(height);
}

Expand Down
Loading