File tree 3 files changed +4
-6
lines changed
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -724,7 +724,7 @@ bool CWallet::EncryptWallet(const SecureString& strWalletPassphrase)
724
724
725
725
// If we are using descriptors, make new descriptors with a new seed
726
726
if (IsWalletFlagSet (WALLET_FLAG_DESCRIPTORS) && !IsWalletFlagSet (WALLET_FLAG_BLANK_WALLET)) {
727
- SetupDescriptorScriptPubKeyMans ( " " , " " );
727
+ // Do nothing for descriptor wallets (keep old seed / mnemonic)
728
728
} else if (auto spk_man = GetLegacyScriptPubKeyMan ()) {
729
729
// if we are not using HD, generate new keypool
730
730
if (spk_man->IsHDEnabled ()) {
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ def run_test(self):
91
91
send_wrpc .walletpassphrase ('pass' , 10 )
92
92
addr = send_wrpc .getnewaddress ()
93
93
info2 = send_wrpc .getaddressinfo (addr )
94
- assert info1 ['hdmasterfingerprint' ] ! = info2 ['hdmasterfingerprint' ]
94
+ assert info1 ['hdmasterfingerprint' ] = = info2 ['hdmasterfingerprint' ]
95
95
send_wrpc .walletlock ()
96
96
assert 'hdmasterfingerprint' in send_wrpc .getaddressinfo (send_wrpc .getnewaddress ())
97
97
info3 = send_wrpc .getaddressinfo (addr )
Original file line number Diff line number Diff line change @@ -46,16 +46,14 @@ def run_test(self):
46
46
mnemonic_count += 1
47
47
if desc ['mnemonic' ] == mnemonic_pre :
48
48
found_in_encrypted += 1
49
- assert not desc ['active' ]
50
- else :
51
49
assert desc ['active' ]
52
50
# there should 5 descriptors in total
53
51
# one of them imported private key for coinbase without mnemonic
54
52
# encryption of descriptor wallet creates new private keys,
55
53
# it should be 2 active and 2 inactive mnemonics
56
54
assert_equal (found_in_encrypted , 2 )
57
- assert_equal (mnemonic_count , 4 )
58
- assert_equal (len (descriptors ), 5 )
55
+ assert_equal (mnemonic_count , 2 )
56
+ assert_equal (len (descriptors ), 3 )
59
57
else :
60
58
assert_equal (len (self .nodes [0 ].dumphdinfo ()["mnemonic" ].split ()), 12 ) # 12 words by default
61
59
# legacy HD wallets could have only one chain
You can’t perform that action at this time.
0 commit comments