test: use f-strings in mining_*.py tests

This commit is contained in:
fanquake 2021-06-12 15:24:35 +08:00
parent c2a5d560df
commit 68faa87881
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1

View file

@ -65,10 +65,10 @@ class MiningTest(BitcoinTestFramework):
assert_equal(mining_info['currentblockweight'], 4000)
self.log.info('test blockversion')
self.restart_node(0, extra_args=['-mocktime={}'.format(t), '-blockversion=1337'])
self.restart_node(0, extra_args=[f'-mocktime={t}', '-blockversion=1337'])
self.connect_nodes(0, 1)
assert_equal(1337, self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
self.restart_node(0, extra_args=['-mocktime={}'.format(t)])
self.restart_node(0, extra_args=[f'-mocktime={t}'])
self.connect_nodes(0, 1)
assert_equal(VERSIONBITS_TOP_BITS + (1 << VERSIONBITS_DEPLOYMENT_TESTDUMMY_BIT), self.nodes[0].getblocktemplate(NORMAL_GBT_REQUEST_PARAMS)['version'])
self.restart_node(0)