aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-07-12 15:03:38 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-07-25 15:51:36 +0200
commitfafe43cb6c76a5f60194be128a40baf161d39920 (patch)
treec937fa5944c0a374f0a4828a24709f42f2f3de2d /test
parentfa060c15fb5081e66ed1ebe05dca6e8026f32c4f (diff)
downloadbitcoin-fafe43cb6c76a5f60194be128a40baf161d39920.tar.xz
scripted-diff: Use blocks_path where possible
-BEGIN VERIFY SCRIPT- sed -i 's|].chain_path / "blocks"|].blocks_path|g' $(git grep -l chain_path) -END VERIFY SCRIPT-
Diffstat (limited to 'test')
-rwxr-xr-xtest/functional/feature_abortnode.py2
-rwxr-xr-xtest/functional/feature_dirsymlinks.py2
-rwxr-xr-xtest/functional/feature_loadblock.py2
-rwxr-xr-xtest/functional/feature_reindex.py2
-rwxr-xr-xtest/functional/feature_remove_pruned_files_on_startup.py8
-rwxr-xr-xtest/functional/feature_unsupported_utxo_db.py4
-rwxr-xr-xtest/functional/rpc_blockchain.py4
7 files changed, 12 insertions, 12 deletions
diff --git a/test/functional/feature_abortnode.py b/test/functional/feature_abortnode.py
index 76b50a5bfc..740d3b7f0e 100755
--- a/test/functional/feature_abortnode.py
+++ b/test/functional/feature_abortnode.py
@@ -25,7 +25,7 @@ class AbortNodeTest(BitcoinTestFramework):
self.generate(self.nodes[0], 3, sync_fun=self.no_op)
# Deleting the undo file will result in reorg failure
- (self.nodes[0].chain_path / "blocks" / "rev00000.dat").unlink()
+ (self.nodes[0].blocks_path / "rev00000.dat").unlink()
# Connecting to a node with a more work chain will trigger a reorg
# attempt.
diff --git a/test/functional/feature_dirsymlinks.py b/test/functional/feature_dirsymlinks.py
index 288754c04c..96f4aed08a 100755
--- a/test/functional/feature_dirsymlinks.py
+++ b/test/functional/feature_dirsymlinks.py
@@ -26,7 +26,7 @@ class SymlinkTest(BitcoinTestFramework):
self.stop_node(0)
rename_and_link(
- from_name=self.nodes[0].chain_path / "blocks",
+ from_name=self.nodes[0].blocks_path,
to_name=dir_new_blocks,
)
rename_and_link(
diff --git a/test/functional/feature_loadblock.py b/test/functional/feature_loadblock.py
index c90ccc4936..12d65fde68 100755
--- a/test/functional/feature_loadblock.py
+++ b/test/functional/feature_loadblock.py
@@ -37,7 +37,7 @@ class LoadblockTest(BitcoinTestFramework):
cfg_file = os.path.join(data_dir, "linearize.cfg")
bootstrap_file = os.path.join(self.options.tmpdir, "bootstrap.dat")
genesis_block = self.nodes[0].getblockhash(0)
- blocks_dir = self.nodes[0].chain_path / "blocks"
+ blocks_dir = self.nodes[0].blocks_path
hash_list = tempfile.NamedTemporaryFile(dir=data_dir,
mode='w',
delete=False,
diff --git a/test/functional/feature_reindex.py b/test/functional/feature_reindex.py
index fcbb49d420..83f1c5003c 100755
--- a/test/functional/feature_reindex.py
+++ b/test/functional/feature_reindex.py
@@ -38,7 +38,7 @@ class ReindexTest(BitcoinTestFramework):
# In this test environment, blocks will always be in order (since
# we're generating them rather than getting them from peers), so to
# test out-of-order handling, swap blocks 1 and 2 on disk.
- blk0 = self.nodes[0].chain_path / "blocks" / "blk00000.dat"
+ blk0 = self.nodes[0].blocks_path / "blk00000.dat"
with open(blk0, 'r+b') as bf:
# Read at least the first few blocks (including genesis)
b = bf.read(2000)
diff --git a/test/functional/feature_remove_pruned_files_on_startup.py b/test/functional/feature_remove_pruned_files_on_startup.py
index a55e08ef1a..c128587949 100755
--- a/test/functional/feature_remove_pruned_files_on_startup.py
+++ b/test/functional/feature_remove_pruned_files_on_startup.py
@@ -20,10 +20,10 @@ class FeatureRemovePrunedFilesOnStartupTest(BitcoinTestFramework):
self.sync_blocks()
def run_test(self):
- 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"
+ blk0 = self.nodes[0].blocks_path / "blk00000.dat"
+ rev0 = self.nodes[0].blocks_path / "rev00000.dat"
+ blk1 = self.nodes[0].blocks_path / "blk00001.dat"
+ rev1 = self.nodes[0].blocks_path / "rev00001.dat"
self.mine_batches(800)
fo1 = os.open(blk0, os.O_RDONLY)
fo2 = os.open(rev1, os.O_RDONLY)
diff --git a/test/functional/feature_unsupported_utxo_db.py b/test/functional/feature_unsupported_utxo_db.py
index 1c8c08d1d8..6acf551216 100755
--- a/test/functional/feature_unsupported_utxo_db.py
+++ b/test/functional/feature_unsupported_utxo_db.py
@@ -40,9 +40,9 @@ class UnsupportedUtxoDbTest(BitcoinTestFramework):
self.log.info("Check init error")
legacy_utxos_dir = self.nodes[0].chain_path / "chainstate"
- legacy_blocks_dir = self.nodes[0].chain_path / "blocks"
+ legacy_blocks_dir = self.nodes[0].blocks_path
recent_utxos_dir = self.nodes[1].chain_path / "chainstate"
- recent_blocks_dir = self.nodes[1].chain_path / "blocks"
+ recent_blocks_dir = self.nodes[1].blocks_path
shutil.copytree(legacy_utxos_dir, recent_utxos_dir)
shutil.copytree(legacy_blocks_dir, recent_blocks_dir)
self.nodes[1].assert_start_raises_init_error(
diff --git a/test/functional/rpc_blockchain.py b/test/functional/rpc_blockchain.py
index 5f2bece733..18a0a0c6cc 100755
--- a/test/functional/rpc_blockchain.py
+++ b/test/functional/rpc_blockchain.py
@@ -577,8 +577,8 @@ class BlockchainTest(BitcoinTestFramework):
self.log.info("Test that getblock with verbosity 2 and 3 still works with pruned Undo data")
def move_block_file(old, new):
- old_path = self.nodes[0].chain_path / "blocks" / old
- new_path = self.nodes[0].chain_path / "blocks" / new
+ old_path = self.nodes[0].blocks_path / old
+ new_path = self.nodes[0].blocks_path / new
old_path.rename(new_path)
# Move instead of deleting so we can restore chain state afterwards