0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

descriptor: don't assert success of extended key derivation

It might already fail, and we'll add another failure case.
This commit is contained in:
Antoine Poinsot 2022-07-19 11:44:04 +02:00
parent 50cfc9e761
commit 8dc6670ce1
No known key found for this signature in database
GPG key ID: E13FC145CD3F4304

View file

@ -388,14 +388,13 @@ public:
}
} else {
for (auto entry : m_path) {
der = parent_extkey.Derive(parent_extkey, entry);
assert(der);
if (!parent_extkey.Derive(parent_extkey, entry)) return false;
}
final_extkey = parent_extkey;
if (m_derive == DeriveType::UNHARDENED) der = parent_extkey.Derive(final_extkey, pos);
assert(m_derive != DeriveType::HARDENED);
}
assert(der);
if (!der) return false;
final_info_out = final_info_out_tmp;
key_out = final_extkey.pubkey;