diff options
author | Sjors Provoost <sjors@sprovoost.nl> | 2021-09-22 13:10:40 +0200 |
---|---|---|
committer | Sjors Provoost <sjors@sprovoost.nl> | 2021-12-16 12:41:45 +0700 |
commit | d8b705f1caeb3b4a6790cb26e4e5584ca791d965 (patch) | |
tree | d4b3c0cad7e5137ddca95dbb60a516228f79cdad /test/functional/test_framework | |
parent | 40849eebd9c7a92f6b670b30c9338358d8306cfe (diff) |
test: previous releases: add v22.0
Diffstat (limited to 'test/functional/test_framework')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 5a9f8f3adc..ecdc3bf424 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -447,11 +447,15 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): def get_bin_from_version(version, bin_name, bin_default): if not version: return bin_default + if version > 219999: + # Starting at client version 220000 the first two digits represent + # the major version, e.g. v22.0 instead of v0.22.0. + version *= 100 return os.path.join( self.options.previous_releases_path, re.sub( - r'\.0$', - '', # remove trailing .0 for point releases + r'\.0$' if version <= 219999 else r'(\.0){1,2}$', + '', # Remove trailing dot for point releases, after 22.0 also remove double trailing dot. 'v{}.{}.{}.{}'.format( (version % 100000000) // 1000000, (version % 1000000) // 10000, |