aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_dbcrash.py
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-03 01:10:56 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2020-08-06 18:39:33 +0200
commitdac7a111bdd3b0233d94cf68dae7a8bfc6ac9c64 (patch)
treec3ae6f8e52eade778dff7c9ad679a919db22778b /test/functional/feature_dbcrash.py
parent82127d27c9001eee3eb28df67ce2e6eace620423 (diff)
downloadbitcoin-dac7a111bdd3b0233d94cf68dae7a8bfc6ac9c64.tar.xz
refactor: test: use _ variable for unused loop counters
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
Diffstat (limited to 'test/functional/feature_dbcrash.py')
-rwxr-xr-xtest/functional/feature_dbcrash.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/feature_dbcrash.py b/test/functional/feature_dbcrash.py
index 7b38e09bf9..7a2e35c095 100755
--- a/test/functional/feature_dbcrash.py
+++ b/test/functional/feature_dbcrash.py
@@ -195,7 +195,7 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
while len(utxo_list) >= 2 and num_transactions < count:
tx = CTransaction()
input_amount = 0
- for i in range(2):
+ for _ in range(2):
utxo = utxo_list.pop()
tx.vin.append(CTxIn(COutPoint(int(utxo['txid'], 16), utxo['vout'])))
input_amount += int(utxo['amount'] * COIN)
@@ -205,7 +205,7 @@ class ChainstateWriteCrashTest(BitcoinTestFramework):
# Sanity check -- if we chose inputs that are too small, skip
continue
- for i in range(3):
+ for _ in range(3):
tx.vout.append(CTxOut(output_amount, hex_str_to_bytes(utxo['scriptPubKey'])))
# Sign and send the transaction to get into the mempool