mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-02 09:46:52 -05:00
test: use f-strings in feature_loadblock.py
This commit is contained in:
parent
e9ca8b254d
commit
fb633933ab
1 changed files with 12 additions and 12 deletions
|
@ -45,17 +45,17 @@ class LoadblockTest(BitcoinTestFramework):
|
|||
|
||||
self.log.info("Create linearization config file")
|
||||
with open(cfg_file, "a", encoding="utf-8") as cfg:
|
||||
cfg.write("datadir={}\n".format(data_dir))
|
||||
cfg.write("rpcuser={}\n".format(node_url.username))
|
||||
cfg.write("rpcpassword={}\n".format(node_url.password))
|
||||
cfg.write("port={}\n".format(node_url.port))
|
||||
cfg.write("host={}\n".format(node_url.hostname))
|
||||
cfg.write("output_file={}\n".format(bootstrap_file))
|
||||
cfg.write("max_height=100\n")
|
||||
cfg.write("netmagic=fabfb5da\n")
|
||||
cfg.write("input={}\n".format(blocks_dir))
|
||||
cfg.write("genesis={}\n".format(genesis_block))
|
||||
cfg.write("hashlist={}\n".format(hash_list.name))
|
||||
cfg.write(f"datadir={data_dir}\n")
|
||||
cfg.write(f"rpcuser={node_url.username}\n")
|
||||
cfg.write(f"rpcpassword={node_url.password}\n")
|
||||
cfg.write(f"port={node_url.port}\n")
|
||||
cfg.write(f"host={node_url.hostname}\n")
|
||||
cfg.write(f"output_file={bootstrap_file}\n")
|
||||
cfg.write(f"max_height=100\n")
|
||||
cfg.write(f"netmagic=fabfb5da\n")
|
||||
cfg.write(f"input={blocks_dir}\n")
|
||||
cfg.write(f"genesis={genesis_block}\n")
|
||||
cfg.write(f"hashlist={hash_list.name}\n")
|
||||
|
||||
base_dir = self.config["environment"]["SRCDIR"]
|
||||
linearize_dir = os.path.join(base_dir, "contrib", "linearize")
|
||||
|
@ -72,7 +72,7 @@ class LoadblockTest(BitcoinTestFramework):
|
|||
check=True)
|
||||
|
||||
self.log.info("Restart second, unsynced node with bootstrap file")
|
||||
self.restart_node(1, extra_args=["-loadblock=" + bootstrap_file])
|
||||
self.restart_node(1, extra_args=[f"-loadblock={bootstrap_file}"])
|
||||
assert_equal(self.nodes[1].getblockcount(), 100) # start_node is blocking on all block files being imported
|
||||
|
||||
assert_equal(self.nodes[1].getblockchaininfo()['blocks'], 100)
|
||||
|
|
Loading…
Add table
Reference in a new issue