Skip to content

Commit d5842ad

Browse files
committed
Remove repeated lines
1 parent 961a5e3 commit d5842ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/validation.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -5215,7 +5215,7 @@ bool ChainstateManager::ShouldCheckBlockIndex() const
52155215
{
52165216
// Assert to verify Flatten() has been called.
52175217
if (!*Assert(m_options.check_block_index)) return false;
5218-
if (GetRand(*m_options.check_block_index) >= 1) return false;
5218+
if (FastRandomContext().randrange(*m_options.check_block_index) >= 1) return false;
52195219
return true;
52205220
}
52215221

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

0 commit comments

Comments
 (0)