Skip to content

Commit

Permalink
refactor: use irange
Browse files Browse the repository at this point in the history
  • Loading branch information
PastaPastaPasta committed Oct 29, 2024
1 parent 4cc3ee6 commit 2d05df0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/evo/creditpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <deploymentstatus.h>
#include <logging.h>
#include <node/blockstorage.h>
#include <util/irange.h>
#include <validation.h>

#include <algorithm>
Expand Down Expand Up @@ -164,7 +165,7 @@ CCreditPool CCreditPoolManager::ConstructCreditPool(const CBlockIndex* const blo
}

const CBlockIndex* distant_block_index = block_index;
for (auto i = 0; i < Params().CreditPoolPeriodBlocks(); ++i) {
for ([[maybe_unused]] auto _ : irange::range(Params().CreditPoolPeriodBlocks())) {
distant_block_index = distant_block_index->pprev;
if (distant_block_index == nullptr) break;
}
Expand Down

0 comments on commit 2d05df0

Please sign in to comment.