mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-09-11 21:20:39 +02:00
test: Add 31.0 to wallet backwards compatibility test
Since 31.0 has a compatibility issue with wallets containing miniscript descriptors, this should be in the test, with a test for the failure condition.
This commit is contained in:
@@ -36,11 +36,12 @@ LAST_KEYPOOL_INDEX = 9 # Index of the last derived address with the keypool size
|
||||
class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 9
|
||||
self.num_nodes = 10
|
||||
# Add new version after each release:
|
||||
self.extra_args = [
|
||||
["-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # Pre-release: use to mine blocks. noban for immediate tx relay
|
||||
["-nowallet", "-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # Pre-release: use to receive coins, swap wallets, etc
|
||||
["-nowallet", "-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # v31.0
|
||||
["-nowallet", "-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # v30.2
|
||||
["-nowallet", "-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # v25.0
|
||||
["-nowallet", "-addresstype=bech32", "-whitelist=noban@127.0.0.1"], # v24.0.1
|
||||
@@ -59,6 +60,7 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
self.add_nodes(self.num_nodes, extra_args=self.extra_args, versions=[
|
||||
None,
|
||||
None,
|
||||
310000,
|
||||
300200,
|
||||
250000,
|
||||
240001,
|
||||
@@ -363,6 +365,14 @@ class BackwardsCompatibilityTest(BitcoinTestFramework):
|
||||
continue
|
||||
# Also try to reopen on master after opening on old
|
||||
for n in [node, node_master]:
|
||||
# 31.0 has a descriptor id calculation incompatibility.
|
||||
# Miniscript descriptors imported into node versions other than 31.0 will
|
||||
# result in wallets that cannot be loaded into 31.0.
|
||||
# These wallets will emit a "Wallet corrupted" error.
|
||||
if wallet_name == "miniscript" and n.version == 310000:
|
||||
assert_raises_rpc_error(-4, "Wallet corrupted", n.loadwallet, wallet_name)
|
||||
continue
|
||||
|
||||
n.loadwallet(wallet_name)
|
||||
wallet = n.get_wallet_rpc(wallet_name)
|
||||
info = wallet.getwalletinfo()
|
||||
|
||||
@@ -100,6 +100,15 @@ SHA256_SUMS = {
|
||||
"99d5cee9b9c37be506396c30837a4b98e320bfea71c474d6120a7e8eb6075c7b": {"tag": "v30.2", "archive": "bitcoin-30.2-x86_64-apple-darwin.tar.gz"},
|
||||
"6aa7bb4feb699c4c6262dd23e4004191f6df7f373b5d5978b5bcdd4bb72f75d8": {"tag": "v30.2", "archive": "bitcoin-30.2-x86_64-linux-gnu.tar.gz"},
|
||||
"0d7e1f16f8823aa26d29b44855ff6dbac11c03d75631a6c1d2ea5fab3a84fdf8": {"tag": "v30.2", "archive": "bitcoin-30.2-win64.zip"},
|
||||
|
||||
"4de1d568dedd48604f75132421bc0abeca432639589b49a3909c81db3a813112": {"tag": "v31.0", "archive": "bitcoin-31.0-aarch64-linux-gnu.tar.gz"},
|
||||
"8c19d007bfc73502625095ea4073af3a98ceb722d500556ab173bac5bcadd0d6": {"tag": "v31.0", "archive": "bitcoin-31.0-arm-linux-gnueabihf.tar.gz"},
|
||||
"a2d7a13b4da53d4a3e4c517f3a0269e2429813417bb320d3b268993cfdc545d0": {"tag": "v31.0", "archive": "bitcoin-31.0-arm64-apple-darwin.tar.gz"},
|
||||
"1d9c865aa0ccf675fc068e79d9fa57a5a70b59132fca38bb322a7d44ce2f0ff2": {"tag": "v31.0", "archive": "bitcoin-31.0-powerpc64-linux-gnu.tar.gz"},
|
||||
"7ece4ea365bba9b2008b27f0717ef6a518598a572edaa2815e775faadc53c136": {"tag": "v31.0", "archive": "bitcoin-31.0-riscv64-linux-gnu.tar.gz"},
|
||||
"56824dd705bc2a3b22d42e8aa02ed53498d491ff7c2c8aa96831333871887ead": {"tag": "v31.0", "archive": "bitcoin-31.0-x86_64-apple-darwin.tar.gz"},
|
||||
"d3e4c58a35b1d0a97a457462c94f55501ad167c660c245cb1ffa565641c65074": {"tag": "v31.0", "archive": "bitcoin-31.0-x86_64-linux-gnu.tar.gz"},
|
||||
"82fd2c504a0f20a31d4d13bd407783d6fc7bf17622d0ce85228a9b92694e03f0": {"tag": "v31.0", "archive": "bitcoin-31.0-win64.zip"},
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user