diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-29 11:08:32 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-04-29 11:09:05 -0400 |
commit | e302830faed00c259a517d87ce032dcd8c47528f (patch) | |
tree | 89de09c8584c222aa3cbbbf63533b2dcf7410a83 /test/functional/test_framework | |
parent | af2ec6b03745cf408f169cfbd74e3380a69975e0 (diff) | |
parent | 66fe7b1a98c03f690dcf60d359baac124658aeae (diff) |
Merge #18774: test: added test for upgradewallet RPC
66fe7b1a98c03f690dcf60d359baac124658aeae test: added test for upgradewallet RPC (Harris)
Pull request description:
This PR adds tests for the newly merged *upgradewallet* RPC.
Additionally, it expands `test_framework/util.py` by adding the function `adjust_bitcoin_conf_for_pre_17` to support nodes that don't parse configuration sections.
This test uses two older node versions, v0.15.2 and v0.16.3, to create older wallet versions to be used by `upgradewallet`.
Fixes https://github.com/bitcoin/bitcoin/issues/18767
Top commit has no ACKs.
Tree-SHA512: bb72ff1e829e2c3954386cc308842820ef0828a4fbb754202b225a8748f92d4dcc5ec77fb146bfd5484a5c2f29ce95adf9f3fb4483437088ff3ea4a8d2c442c1
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r-- | test/functional/test_framework/util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 64e1aa3bbc..eb9f6528b3 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -326,6 +326,13 @@ def initialize_datadir(dirname, n, chain): os.makedirs(os.path.join(datadir, 'stdout'), exist_ok=True) return datadir +def adjust_bitcoin_conf_for_pre_17(conf_file): + with open(conf_file,'r', encoding='utf8') as conf: + conf_data = conf.read() + with open(conf_file, 'w', encoding='utf8') as conf: + conf_data_changed = conf_data.replace('[regtest]', '') + conf.write(conf_data_changed) + def get_datadir_path(dirname, n): return os.path.join(dirname, "node" + str(n)) |