HomePhabricator

refactor: test: use _ variable for unused loop counters

Description

refactor: test: use _ variable for unused loop counters

Summary:
substitutes "for x in range(N):" by "for _ in range(N):"
indicates to the reader that a block is just repeated N times, and
that the loop counter is not used in the body

Backport notes:

  • this PR also replaces a few occurences of range(0, x) with range(x)
  • test/functional/p2p_tx_download.py has been included in test/functional/p2p_inv_download.py, and was already up to date

This is a backport of core#19674

Test Plan: ninja check-functional-extended

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D10068

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Aug 2 2020, 23:10
PiRKCommitted on Sep 8 2021, 06:45
PiRKPushed on Sep 8 2021, 06:45
Reviewer
Restricted Project
Differential Revision
D10068: refactor: test: use _ variable for unused loop counters
Parents
rABCbec895ada9fc: Deduplicate missing parents of orphan transactions
Branches
Unknown
Tags
Unknown