mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-29 18:20:58 +02:00
test: Use TestNode *_path properties where possible
Seems odd to place the burden on test writers to hardcode the chain or datadir path for the nodes under test.
This commit is contained in:
@ -20,10 +20,10 @@ class FeatureRemovePrunedFilesOnStartupTest(BitcoinTestFramework):
|
||||
self.sync_blocks()
|
||||
|
||||
def run_test(self):
|
||||
blk0 = os.path.join(self.nodes[0].datadir, self.nodes[0].chain, 'blocks', 'blk00000.dat')
|
||||
rev0 = os.path.join(self.nodes[0].datadir, self.nodes[0].chain, 'blocks', 'rev00000.dat')
|
||||
blk1 = os.path.join(self.nodes[0].datadir, self.nodes[0].chain, 'blocks', 'blk00001.dat')
|
||||
rev1 = os.path.join(self.nodes[0].datadir, self.nodes[0].chain, 'blocks', 'rev00001.dat')
|
||||
blk0 = self.nodes[0].chain_path / "blocks" / "blk00000.dat"
|
||||
rev0 = self.nodes[0].chain_path / "blocks" / "rev00000.dat"
|
||||
blk1 = self.nodes[0].chain_path / "blocks" / "blk00001.dat"
|
||||
rev1 = self.nodes[0].chain_path / "blocks" / "rev00001.dat"
|
||||
self.mine_batches(800)
|
||||
fo1 = os.open(blk0, os.O_RDONLY)
|
||||
fo2 = os.open(rev1, os.O_RDONLY)
|
||||
|
Reference in New Issue
Block a user