@@ -942,7 +942,7 @@ def test_witness_block_size(self):
942
942
parent_tx = CTransaction ()
943
943
parent_tx .vin .append (CTxIn (prevout , b"" ))
944
944
child_value = int (value / NUM_OUTPUTS )
945
- for i in range (NUM_OUTPUTS ):
945
+ for _ in range (NUM_OUTPUTS ):
946
946
parent_tx .vout .append (CTxOut (child_value , script_pubkey ))
947
947
parent_tx .vout [0 ].nValue -= 50000
948
948
assert parent_tx .vout [0 ].nValue > 0
@@ -952,7 +952,7 @@ def test_witness_block_size(self):
952
952
for i in range (NUM_OUTPUTS ):
953
953
child_tx .vin .append (CTxIn (COutPoint (parent_tx .sha256 , i ), b"" ))
954
954
child_tx .vout = [CTxOut (value - 100000 , CScript ([OP_TRUE ]))]
955
- for i in range (NUM_OUTPUTS ):
955
+ for _ in range (NUM_OUTPUTS ):
956
956
child_tx .wit .vtxinwit .append (CTxInWitness ())
957
957
child_tx .wit .vtxinwit [- 1 ].scriptWitness .stack = [b'a' * 195 ] * (2 * NUM_DROPS ) + [witness_program ]
958
958
child_tx .rehash ()
@@ -1199,7 +1199,7 @@ def test_witness_input_length(self):
1199
1199
tx = CTransaction ()
1200
1200
tx .vin .append (CTxIn (COutPoint (self .utxo [0 ].sha256 , self .utxo [0 ].n ), b"" ))
1201
1201
value = self .utxo [0 ].nValue
1202
- for i in range (10 ):
1202
+ for _ in range (10 ):
1203
1203
tx .vout .append (CTxOut (int (value / 10 ), script_pubkey ))
1204
1204
tx .vout [0 ].nValue -= 1000
1205
1205
assert tx .vout [0 ].nValue >= 0
@@ -1372,7 +1372,7 @@ def test_segwit_versions(self):
1372
1372
tx = CTransaction ()
1373
1373
tx .vin .append (CTxIn (COutPoint (self .utxo [0 ].sha256 , self .utxo [0 ].n ), b"" ))
1374
1374
split_value = (self .utxo [0 ].nValue - 4000 ) // NUM_SEGWIT_VERSIONS
1375
- for i in range (NUM_SEGWIT_VERSIONS ):
1375
+ for _ in range (NUM_SEGWIT_VERSIONS ):
1376
1376
tx .vout .append (CTxOut (split_value , CScript ([OP_TRUE ])))
1377
1377
tx .rehash ()
1378
1378
block = self .build_next_block ()
@@ -1646,7 +1646,7 @@ def test_signature_version_1(self):
1646
1646
tx = CTransaction ()
1647
1647
tx .vin .append (CTxIn (COutPoint (prev_utxo .sha256 , prev_utxo .n ), b"" ))
1648
1648
split_value = prev_utxo .nValue // NUM_SIGHASH_TESTS
1649
- for i in range (NUM_SIGHASH_TESTS ):
1649
+ for _ in range (NUM_SIGHASH_TESTS ):
1650
1650
tx .vout .append (CTxOut (split_value , script_pubkey ))
1651
1651
tx .wit .vtxinwit .append (CTxInWitness ())
1652
1652
sign_p2pk_witness_input (witness_program , tx , 0 , SIGHASH_ALL , prev_utxo .nValue , key )
@@ -1676,7 +1676,7 @@ def test_signature_version_1(self):
1676
1676
tx .wit .vtxinwit .append (CTxInWitness ())
1677
1677
total_value += temp_utxos [i ].nValue
1678
1678
split_value = total_value // num_outputs
1679
- for i in range (num_outputs ):
1679
+ for _ in range (num_outputs ):
1680
1680
tx .vout .append (CTxOut (split_value , script_pubkey ))
1681
1681
for i in range (num_inputs ):
1682
1682
# Now try to sign each input, using a random hashtype.
@@ -1974,7 +1974,7 @@ def test_witness_sigops(self):
1974
1974
split_value = self .utxo [0 ].nValue // outputs
1975
1975
tx = CTransaction ()
1976
1976
tx .vin .append (CTxIn (COutPoint (self .utxo [0 ].sha256 , self .utxo [0 ].n ), b"" ))
1977
- for i in range (outputs ):
1977
+ for _ in range (outputs ):
1978
1978
tx .vout .append (CTxOut (split_value , script_pubkey ))
1979
1979
tx .vout [- 2 ].scriptPubKey = script_pubkey_toomany
1980
1980
tx .vout [- 1 ].scriptPubKey = script_pubkey_justright
@@ -2060,7 +2060,7 @@ def serialize_with_bogus_witness(tx):
2060
2060
if (len (tx .wit .vtxinwit ) != len (tx .vin )):
2061
2061
# vtxinwit must have the same length as vin
2062
2062
tx .wit .vtxinwit = tx .wit .vtxinwit [:len (tx .vin )]
2063
- for i in range (len (tx .wit .vtxinwit ), len (tx .vin )):
2063
+ for _ in range (len (tx .wit .vtxinwit ), len (tx .vin )):
2064
2064
tx .wit .vtxinwit .append (CTxInWitness ())
2065
2065
r += tx .wit .serialize ()
2066
2066
r += struct .pack ("<I" , tx .nLockTime )
0 commit comments