mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-03 04:52:50 +02:00
Tests: Use self.chain instead of 'regtest' in almost all current tests
This commit is contained in:
@@ -100,7 +100,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
def setup_network(self):
|
||||
self.setup_nodes()
|
||||
|
||||
self.prunedir = os.path.join(self.nodes[2].datadir, 'regtest', 'blocks', '')
|
||||
self.prunedir = os.path.join(self.nodes[2].datadir, self.chain, 'blocks', '')
|
||||
|
||||
connect_nodes(self.nodes[0], 1)
|
||||
connect_nodes(self.nodes[1], 2)
|
||||
@@ -278,7 +278,7 @@ class PruneTest(BitcoinTestFramework):
|
||||
assert_equal(ret, node.getblockchaininfo()['pruneheight'])
|
||||
|
||||
def has_block(index):
|
||||
return os.path.isfile(os.path.join(self.nodes[node_number].datadir, "regtest", "blocks", "blk{:05}.dat".format(index)))
|
||||
return os.path.isfile(os.path.join(self.nodes[node_number].datadir, self.chain, "blocks", "blk{:05}.dat".format(index)))
|
||||
|
||||
# should not prune because chain tip of node 3 (995) < PruneAfterHeight (1000)
|
||||
assert_raises_rpc_error(-1, "Blockchain is too short for pruning", node.pruneblockchain, height(500))
|
||||
|
Reference in New Issue
Block a user