mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-17 21:50:43 +02: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:
parent
50cfc9e761
commit
8dc6670ce1
@ -388,14 +388,13 @@ public:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (auto entry : m_path) {
|
for (auto entry : m_path) {
|
||||||
der = parent_extkey.Derive(parent_extkey, entry);
|
if (!parent_extkey.Derive(parent_extkey, entry)) return false;
|
||||||
assert(der);
|
|
||||||
}
|
}
|
||||||
final_extkey = parent_extkey;
|
final_extkey = parent_extkey;
|
||||||
if (m_derive == DeriveType::UNHARDENED) der = parent_extkey.Derive(final_extkey, pos);
|
if (m_derive == DeriveType::UNHARDENED) der = parent_extkey.Derive(final_extkey, pos);
|
||||||
assert(m_derive != DeriveType::HARDENED);
|
assert(m_derive != DeriveType::HARDENED);
|
||||||
}
|
}
|
||||||
assert(der);
|
if (!der) return false;
|
||||||
|
|
||||||
final_info_out = final_info_out_tmp;
|
final_info_out = final_info_out_tmp;
|
||||||
key_out = final_extkey.pubkey;
|
key_out = final_extkey.pubkey;
|
||||||
|
Loading…
Reference in New Issue
Block a user