mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 04:02:25 +01: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:
@@ -74,8 +74,8 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
|
||||
def nodes_wallet_dir(self, node):
|
||||
if node.version < 170000:
|
||||
return os.path.join(node.datadir, "regtest")
|
||||
return os.path.join(node.datadir, "regtest/wallets")
|
||||
return node.chain_path
|
||||
return node.wallets_path
|
||||
|
||||
def run_test(self):
|
||||
node_miner = self.nodes[0]
|
||||
@@ -157,10 +157,10 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
assert info['keypoolsize'] == 0
|
||||
|
||||
# Unload wallets and copy to older nodes:
|
||||
node_master_wallets_dir = os.path.join(node_master.datadir, "regtest/wallets")
|
||||
node_v19_wallets_dir = os.path.join(node_v19.datadir, "regtest/wallets")
|
||||
node_v17_wallets_dir = os.path.join(node_v17.datadir, "regtest/wallets")
|
||||
node_v16_wallets_dir = os.path.join(node_v16.datadir, "regtest")
|
||||
node_master_wallets_dir = node_master.wallets_path
|
||||
node_v19_wallets_dir = node_v19.wallets_path
|
||||
node_v17_wallets_dir = node_v17.wallets_path
|
||||
node_v16_wallets_dir = node_v16.chain_path
|
||||
node_master.unloadwallet("w1")
|
||||
node_master.unloadwallet("w2")
|
||||
node_master.unloadwallet("w3")
|
||||
|
||||
Reference in New Issue
Block a user