Skip to content

Commit e4a0c35

Browse files
committed
Improve blocksdir functional test.
A new node should not create an unused `blocks` directory in the root of the data directory when `-testnet` or `-regtest` is specified.
1 parent c3f1821 commit e4a0c35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/functional/feature_blocksdir.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ def set_test_params(self):
1818

1919
def run_test(self):
2020
self.stop_node(0)
21+
assert os.path.isdir(os.path.join(self.nodes[0].datadir, "regtest", "blocks"))
22+
assert not os.path.isdir(os.path.join(self.nodes[0].datadir, "blocks"))
2123
shutil.rmtree(self.nodes[0].datadir)
2224
initialize_datadir(self.options.tmpdir, 0)
2325
self.log.info("Starting with nonexistent blocksdir ...")

0 commit comments

Comments
 (0)