Skip to content

Commit

Permalink
Remove repeated lines
Browse files Browse the repository at this point in the history
  • Loading branch information
janus committed Sep 7, 2024
1 parent 961a5e3 commit d5842ad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5215,7 +5215,7 @@ bool ChainstateManager::ShouldCheckBlockIndex() const
{
// Assert to verify Flatten() has been called.
if (!*Assert(m_options.check_block_index)) return false;
if (GetRand(*m_options.check_block_index) >= 1) return false;
if (FastRandomContext().randrange(*m_options.check_block_index) >= 1) return false;
return true;
}

Expand Down Expand Up @@ -5250,8 +5250,6 @@ void ChainstateManager::CheckBlockIndex()
if (!best_hdr_chain.Contains(&block_index)) {
// Only genesis, which must be part of the best header chain, can have a nullptr parent.
assert(block_index.pprev);
forward.emplace(block_index.pprev, &block_index);
forward.emplace(block_index.pprev, &block_index);
forward.emplace(block_index.pprev, &block_index);
}
}
Expand Down

0 comments on commit d5842ad

Please sign in to comment.