mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
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
This commit is contained in:
@@ -569,7 +569,7 @@ class WalletTest(BitcoinTestFramework):
|
||||
# So we should be able to generate exactly chainlimit txs for each original output
|
||||
sending_addr = self.nodes[1].getnewaddress()
|
||||
txid_list = []
|
||||
for i in range(chainlimit * 2):
|
||||
for _ in range(chainlimit * 2):
|
||||
txid_list.append(self.nodes[0].sendtoaddress(sending_addr, Decimal('0.0001')))
|
||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], chainlimit * 2)
|
||||
assert_equal(len(txid_list), chainlimit * 2)
|
||||
|
Reference in New Issue
Block a user