@@ -45,16 +45,16 @@ def run_test(self):
45
45
# Start building a chain on node0. node2 shouldn't be able to sync until node1's
46
46
# minchainwork is exceeded
47
47
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 ]} )" )
49
49
50
50
starting_blockcount = self .nodes [2 ].getblockcount ()
51
51
52
52
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" )
54
54
hashes = self .nodes [0 ].generatetoaddress (num_blocks_to_generate ,
55
55
self .nodes [0 ].get_deterministic_priv_key ().address )
56
56
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' ]} " )
58
58
59
59
# Sleep a few seconds and verify that node2 didn't get any new blocks
60
60
# or headers. We sleep, rather than sync_blocks(node0, node1) because
@@ -63,7 +63,7 @@ def run_test(self):
63
63
time .sleep (3 )
64
64
65
65
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 ]} " )
67
67
# Node2 shouldn't have any new headers yet, because node1 should not
68
68
# have relayed anything.
69
69
assert_equal (len (self .nodes [2 ].getchaintips ()), 1 )
@@ -84,7 +84,7 @@ def run_test(self):
84
84
# continue the test.
85
85
86
86
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 ]} " )
88
88
89
89
if __name__ == '__main__' :
90
90
MinimumChainWorkTest ().main ()
0 commit comments