mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-08-04 14:04:49 +02:00
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.
This commit is contained in:
parent
c3f1821ac7
commit
e4a0c3547e
@ -18,6 +18,8 @@ class BlocksdirTest(BitcoinTestFramework):
|
|||||||
|
|
||||||
def run_test(self):
|
def run_test(self):
|
||||||
self.stop_node(0)
|
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)
|
shutil.rmtree(self.nodes[0].datadir)
|
||||||
initialize_datadir(self.options.tmpdir, 0)
|
initialize_datadir(self.options.tmpdir, 0)
|
||||||
self.log.info("Starting with nonexistent blocksdir ...")
|
self.log.info("Starting with nonexistent blocksdir ...")
|
||||||
|
Loading…
Reference in New Issue
Block a user