aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework
diff options
context:
space:
mode:
authortdb3 <106488469+tdb3@users.noreply.github.com>2024-08-20 19:28:14 -0400
committertdb3 <106488469+tdb3@users.noreply.github.com>2024-08-23 12:49:56 -0400
commitc8176f758b5991c3797c32ee519d32c14b444991 (patch)
treef385174d13b50b6f5db11f9c2a9f21c849d26050 /test/functional/test_framework
parentd79ea809d28197b1b4e3748aa1715272b53601d0 (diff)
test: add blocks_key_path
Adds a convenience function to TestNode to provide the path to the blocks xor key. Updates util and feature_blocksxor to use it.
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-xtest/functional/test_framework/test_node.py4
-rw-r--r--test/functional/test_framework/util.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index b73566b0e9..9e037345f3 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -466,6 +466,10 @@ class TestNode():
return self.chain_path / "blocks"
@property
+ def blocks_key_path(self) -> Path:
+ return self.blocks_path / "xor.dat"
+
+ @property
def wallets_path(self) -> Path:
return self.chain_path / "wallets"
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py
index c3bc861cf6..2372683c04 100644
--- a/test/functional/test_framework/util.py
+++ b/test/functional/test_framework/util.py
@@ -516,7 +516,7 @@ def check_node_connections(*, node, num_in, num_out):
def read_xor_key(*, node):
- with open(node.blocks_path / "xor.dat", "rb") as xor_f:
+ with open(node.blocks_key_path, "rb") as xor_f:
NUM_XOR_BYTES = 8 # From InitBlocksdirXorKey::xor_key.size()
return xor_f.read(NUM_XOR_BYTES)