Skip to content

Commit 1a546e6

Browse files
committed
test: use f-strings in feature_minchainwork.py
1 parent 6679ece commit 1a546e6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/functional/feature_minchainwork.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,16 @@ def run_test(self):
4545
# Start building a chain on node0. node2 shouldn't be able to sync until node1's
4646
# minchainwork is exceeded
4747
starting_chain_work = REGTEST_WORK_PER_BLOCK # Genesis block's work
48-
self.log.info("Testing relay across node %d (minChainWork = %d)", 1, self.node_min_work[1])
48+
self.log.info(f"Testing relay across node 1 (minChainWork = {self.node_min_work[1]})")
4949

5050
starting_blockcount = self.nodes[2].getblockcount()
5151

5252
num_blocks_to_generate = int((self.node_min_work[1] - starting_chain_work) / REGTEST_WORK_PER_BLOCK)
53-
self.log.info("Generating %d blocks on node0", num_blocks_to_generate)
53+
self.log.info(f"Generating {num_blocks_to_generate} blocks on node0")
5454
hashes = self.nodes[0].generatetoaddress(num_blocks_to_generate,
5555
self.nodes[0].get_deterministic_priv_key().address)
5656

57-
self.log.info("Node0 current chain work: %s", self.nodes[0].getblockheader(hashes[-1])['chainwork'])
57+
self.log.info(f"Node0 current chain work: {self.nodes[0].getblockheader(hashes[-1])['chainwork']}")
5858

5959
# Sleep a few seconds and verify that node2 didn't get any new blocks
6060
# or headers. We sleep, rather than sync_blocks(node0, node1) because
@@ -63,7 +63,7 @@ def run_test(self):
6363
time.sleep(3)
6464

6565
self.log.info("Verifying node 2 has no more blocks than before")
66-
self.log.info("Blockcounts: %s", [n.getblockcount() for n in self.nodes])
66+
self.log.info(f"Blockcounts: {[n.getblockcount() for n in self.nodes]}")
6767
# Node2 shouldn't have any new headers yet, because node1 should not
6868
# have relayed anything.
6969
assert_equal(len(self.nodes[2].getchaintips()), 1)
@@ -84,7 +84,7 @@ def run_test(self):
8484
# continue the test.
8585

8686
self.sync_all()
87-
self.log.info("Blockcounts: %s", [n.getblockcount() for n in self.nodes])
87+
self.log.info(f"Blockcounts: {[n.getblockcount() for n in self.nodes]}")
8888

8989
if __name__ == '__main__':
9090
MinimumChainWorkTest().main()

0 commit comments

Comments
 (0)