diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2023-01-23 17:35:04 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2023-01-28 23:49:55 +0100 |
commit | b530d9605db863fd8d0e45e73ff2eb9462d1ad4c (patch) | |
tree | da1393f93c278b292e68e65ec1d35e724dc2f726 /test/functional/wallet_crosschain.py | |
parent | 5271c77f8356dc6de95fd6d08a415df3568eb7a1 (diff) | |
download | bitcoin-b530d9605db863fd8d0e45e73ff2eb9462d1ad4c.tar.xz |
test: refactor: introduce `replace_in_config` helper
Diffstat (limited to 'test/functional/wallet_crosschain.py')
-rwxr-xr-x | test/functional/wallet_crosschain.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/test/functional/wallet_crosschain.py b/test/functional/wallet_crosschain.py index 6f93ad4e3b..7a1297e65f 100755 --- a/test/functional/wallet_crosschain.py +++ b/test/functional/wallet_crosschain.py @@ -25,11 +25,7 @@ class WalletCrossChain(BitcoinTestFramework): # Switch node 1 to testnet before starting it. self.nodes[1].chain = 'testnet3' self.nodes[1].extra_args = ['-maxconnections=0', '-prune=550'] # disable testnet sync - with open(self.nodes[1].bitcoinconf, 'r', encoding='utf8') as conf: - conf_data = conf.read() - with open (self.nodes[1].bitcoinconf, 'w', encoding='utf8') as conf: - conf.write(conf_data.replace('regtest=', 'testnet=').replace('[regtest]', '[test]')) - + self.nodes[1].replace_in_config([('regtest=', 'testnet='), ('[regtest]', '[test]')]) self.start_nodes() def run_test(self): |