Skip to content

Commit 3a03a11

Browse files
committed
Skip hdKeypath of 'm'
Previously the seed was stored with keypath 'm' so we need to skip this as well when determining inactive seeds.
1 parent b5c423c commit 3a03a11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/wallet/walletdb.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,10 +441,11 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
441441
// Extract some CHDChain info from this metadata if it has any
442442
if (keyMeta.nVersion >= CKeyMetadata::VERSION_WITH_HDDATA && !keyMeta.hd_seed_id.IsNull() && keyMeta.hdKeypath.size() > 0) {
443443
// Get the path from the key origin or from the path string
444-
// Not applicable when path is "s" as that indicates a seed
444+
// Not applicable when path is "s" or "m" as those indicate a seed
445+
// See https://github.com/bitcoin/bitcoin/pull/12924
445446
bool internal = false;
446447
uint32_t index = 0;
447-
if (keyMeta.hdKeypath != "s") {
448+
if (keyMeta.hdKeypath != "s" && keyMeta.hdKeypath != "m") {
448449
std::vector<uint32_t> path;
449450
if (keyMeta.has_key_origin) {
450451
// We have a key origin, so pull it from its path vector

0 commit comments

Comments
 (0)