mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-08 13:49:35 +02:00
Don't upgrade to HD split if it is already supported
It is unnecessary to upgrade to FEATURE_HD_SPLIT if this feature is already supported by the wallet. Because upgrading to FEATURE_HD_SPLIT actually requires upgrading to FEATURE_PRE_SPLIT_KEYPOOL, users would accidentally be upgraded to FEATURE_PRE_SPLIT_KEYPOOL instead of nothing being done. Fixes the issue described at https://github.com/bitcoin/bitcoin/pull/20403#discussion_r526063920
This commit is contained in:
@@ -338,6 +338,7 @@ class UpgradeWalletTest(BitcoinTestFramework):
|
||||
new_kvs = dump_bdb_kv(node_master_wallet)
|
||||
up_defaultkey = new_kvs[b'\x0adefaultkey']
|
||||
assert_equal(defaultkey, up_defaultkey)
|
||||
assert_equal(wallet.getwalletinfo()["walletversion"], 159900)
|
||||
# 0.16.3 doesn't have a default key
|
||||
v16_3_kvs = dump_bdb_kv(v16_3_wallet)
|
||||
assert b'\x0adefaultkey' not in v16_3_kvs
|
||||
|
||||
Reference in New Issue
Block a user