Skip to content

Commit cce3024

Browse files
committed
Do not shadow local variable, cleanup
1 parent 5c7a5e1 commit cce3024

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/blockencodings.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ class BlockTransactionsRequest {
5353
}
5454

5555
uint16_t offset = 0;
56-
for (size_t i = 0; i < indexes.size(); i++) {
57-
if (uint64_t(indexes[i]) + uint64_t(offset) > std::numeric_limits<uint16_t>::max())
56+
for (size_t j = 0; j < indexes.size(); j++) {
57+
if (uint64_t(indexes[j]) + uint64_t(offset) > std::numeric_limits<uint16_t>::max())
5858
throw std::ios_base::failure("indexes overflowed 16 bits");
59-
indexes[i] = indexes[i] + offset;
60-
offset = indexes[i] + 1;
59+
indexes[j] = indexes[j] + offset;
60+
offset = indexes[j] + 1;
6161
}
6262
} else {
6363
for (size_t i = 0; i < indexes.size(); i++) {

0 commit comments

Comments
 (0)