From 3a03a11e8c696e2164b8bb221a4a35a7c3ac4d6d Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Fri, 22 May 2020 13:42:35 -0400 Subject: [PATCH] Skip hdKeypath of 'm' Previously the seed was stored with keypath 'm' so we need to skip this as well when determining inactive seeds. --- src/wallet/walletdb.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wallet/walletdb.cpp b/src/wallet/walletdb.cpp index 331408ef4..23993a3a5 100644 --- a/src/wallet/walletdb.cpp +++ b/src/wallet/walletdb.cpp @@ -441,10 +441,11 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, // Extract some CHDChain info from this metadata if it has any if (keyMeta.nVersion >= CKeyMetadata::VERSION_WITH_HDDATA && !keyMeta.hd_seed_id.IsNull() && keyMeta.hdKeypath.size() > 0) { // Get the path from the key origin or from the path string - // Not applicable when path is "s" as that indicates a seed + // Not applicable when path is "s" or "m" as those indicate a seed + // See https://github.com/bitcoin/bitcoin/pull/12924 bool internal = false; uint32_t index = 0; - if (keyMeta.hdKeypath != "s") { + if (keyMeta.hdKeypath != "s" && keyMeta.hdKeypath != "m") { std::vector path; if (keyMeta.has_key_origin) { // We have a key origin, so pull it from its path vector