Skip to content

Commit 09f8fe3

Browse files
committed
lint
1 parent 65cf863 commit 09f8fe3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

testground/benchmark/benchmark/sendtx.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,21 @@ def gen_txs(global_seq, num_accounts, num_txs, home, max_batch=8000):
5959
"chainId": 777,
6060
}
6161
all_txs = []
62-
for batch_start in range(0, num_accounts, max_batch):
63-
batch_end = min(batch_start + max_batch, num_accounts)
62+
for start in range(0, num_accounts, max_batch):
63+
end = min(start + max_batch, num_accounts)
6464
tmp_txs = []
65-
66-
with ThreadPoolExecutor(max_workers=batch_end - batch_start) as executor:
65+
66+
with ThreadPoolExecutor(max_workers=end - start) as executor:
6767
futs = []
68-
for i in range(batch_start, batch_end):
68+
for i in range(start, end):
6969
futs.append(executor.submit(create_txs, global_seq, i, tx, num_txs))
7070
for fut in as_completed(futs):
7171
try:
7272
txs = fut.result()
7373
tmp_txs.extend(txs)
7474
except Exception as e:
7575
print("create_user_with_txs failed", e)
76-
print(f"generated {len(tmp_txs)} txs for accounts {batch_start} to {batch_end - 1}")
76+
print(f"generated {len(tmp_txs)} txs for accounts {start} to {end - 1}")
7777
all_txs.extend(tmp_txs)
7878

7979
print(f"generate {len(all_txs)} txs")

0 commit comments

Comments
 (0)