Skip to content

Commit

Permalink
Don't iter over undo on each block (#3086)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouzo authored Oct 8, 2024
1 parent 1111e45 commit 8ad98ec
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3414,9 +3414,8 @@ bool CChainState::ConnectBlock(const CBlock &block,
mnview.SetLastHeight(pindex->nHeight);

auto &checkpoints = chainparams.Checkpoints().mapCheckpoints;
auto it = checkpoints.lower_bound(pindex->nHeight);
if (it != checkpoints.begin()) {
--it;
auto it = checkpoints.find(pindex->nHeight);
if (it != checkpoints.end()) {
bool pruneStarted = false;
auto time = GetTimeMillis();
CCustomCSView pruned(mnview);
Expand Down

0 comments on commit 8ad98ec

Please sign in to comment.