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:
MarcoFalke
2023-06-14 13:00:11 +02:00
parent dddd89962b
commit aaaa3aefbd
22 changed files with 86 additions and 108 deletions

View File

@ -58,7 +58,7 @@ class MessageCaptureTest(BitcoinTestFramework):
self.setup_clean_chain = True
def run_test(self):
capturedir = os.path.join(self.nodes[0].datadir, "regtest/message_capture")
capturedir = self.nodes[0].chain_path / "message_capture"
# Connect a node so that the handshake occurs
self.nodes[0].add_p2p_connection(P2PDataStore())
self.nodes[0].disconnect_p2ps()