Skip to content

Commit

Permalink
Improve blocksdir functional test.
Browse files Browse the repository at this point in the history
A new node should not create an unused `blocks` directory in the root of
the data directory when `-testnet` or `-regtest` is specified.
  • Loading branch information
hebasto committed Nov 30, 2018
1 parent c3f1821 commit e4a0c35
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/functional/feature_blocksdir.py
Expand Up @@ -18,6 +18,8 @@ def set_test_params(self):

def run_test(self):
self.stop_node(0)
assert os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest", "blocks"))
assert not os.path.isdir(os.path.join(self.nodes[0].datadir, "blocks"))
shutil.rmtree(self.nodes[0].datadir)
initialize_datadir(self.options.tmpdir, 0)
self.log.info("Starting with nonexistent blocksdir ...")
Expand Down

0 comments on commit e4a0c35

Please sign in to comment.