Changeset View
Changeset View
Standalone View
Standalone View
src/script/descriptor.cpp
Show First 20 Lines • Show All 434 Lines • ▼ Show 20 Lines | bool GetPubKey(int pos, const SigningProvider &arg, CPubKey &key_out, | ||||
assert(m_derive != DeriveType::HARDENED); | assert(m_derive != DeriveType::HARDENED); | ||||
} | } | ||||
assert(der); | assert(der); | ||||
final_info_out = final_info_out_tmp; | final_info_out = final_info_out_tmp; | ||||
key_out = final_extkey.pubkey; | key_out = final_extkey.pubkey; | ||||
if (write_cache) { | if (write_cache) { | ||||
write_cache->CacheDerivedExtPubKey(m_expr_index, pos, final_extkey); | |||||
// Only cache parent if there is any unhardened derivation | // Only cache parent if there is any unhardened derivation | ||||
if (m_derive != DeriveType::HARDENED) { | if (m_derive != DeriveType::HARDENED) { | ||||
write_cache->CacheParentExtPubKey(m_expr_index, parent_extkey); | write_cache->CacheParentExtPubKey(m_expr_index, parent_extkey); | ||||
} else if (final_info_out.path.size() > 0) { | |||||
write_cache->CacheDerivedExtPubKey(m_expr_index, pos, | |||||
final_extkey); | |||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
std::string ToString() const override { | std::string ToString() const override { | ||||
std::string ret = | std::string ret = | ||||
EncodeExtPubKey(m_root_extkey) + FormatHDKeypath(m_path); | EncodeExtPubKey(m_root_extkey) + FormatHDKeypath(m_path); | ||||
▲ Show 20 Lines • Show All 840 Lines • Show Last 20 Lines |