aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_abortnode.py
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-06-14 13:00:11 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-06-21 08:49:18 +0200
commitaaaa3aefbdfca1c9243057eeefdc19940e60bf18 (patch)
tree0487012bb53a2f37cea400f843bd94255c676457 /test/functional/feature_abortnode.py
parentdddd89962b26b5593860d016586ee8feb5aeea24 (diff)
downloadbitcoin-aaaa3aefbdfca1c9243057eeefdc19940e60bf18.tar.xz
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.
Diffstat (limited to 'test/functional/feature_abortnode.py')
-rwxr-xr-xtest/functional/feature_abortnode.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/functional/feature_abortnode.py b/test/functional/feature_abortnode.py
index 586722aa65..afee9597ad 100755
--- a/test/functional/feature_abortnode.py
+++ b/test/functional/feature_abortnode.py
@@ -9,10 +9,7 @@
- Mine a fork that requires disconnecting the tip.
- Verify that bitcoind AbortNode's.
"""
-
from test_framework.test_framework import BitcoinTestFramework
-from test_framework.util import get_datadir_path
-import os
class AbortNodeTest(BitcoinTestFramework):
@@ -26,10 +23,9 @@ class AbortNodeTest(BitcoinTestFramework):
def run_test(self):
self.generate(self.nodes[0], 3, sync_fun=self.no_op)
- datadir = get_datadir_path(self.options.tmpdir, 0)
# Deleting the undo file will result in reorg failure
- os.unlink(os.path.join(datadir, self.chain, 'blocks', 'rev00000.dat'))
+ (self.nodes[0].chain_path / "blocks" / "rev00000.dat").unlink()
# Connecting to a node with a more work chain will trigger a reorg
# attempt.