Skip to content

Commit 1df08d1

Browse files
committed
Add assertion for CanSupportFeature(FEATURE_HD_SPLIT)
1 parent cd468d0 commit 1df08d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ void CWallet::DeriveNewChildKey(CKeyMetadata& metadata, CKey& secret, bool inter
138138
masterKey.Derive(accountKey, BIP32_HARDENED_KEY_LIMIT);
139139

140140
// derive m/0'/0' (external chain) OR m/0'/1' (internal chain)
141+
assert(internal ? CanSupportFeature(FEATURE_HD_SPLIT) : true);
141142
accountKey.Derive(chainChildKey, BIP32_HARDENED_KEY_LIMIT+(internal ? 1 : 0));
142143

143144
// derive child key at next index, skip keys already known to the wallet

0 commit comments

Comments
 (0)