Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/scriptpubkeyman.cpp
Show First 20 Lines • Show All 2,119 Lines • ▼ Show 20 Lines | for (size_t i = 0; i < psbtx.tx->vout.size(); ++i) { | ||||
psbtx, i); | psbtx, i); | ||||
} | } | ||||
return TransactionError::OK; | return TransactionError::OK; | ||||
} | } | ||||
std::unique_ptr<CKeyMetadata> | std::unique_ptr<CKeyMetadata> | ||||
DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination &dest) const { | DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination &dest) const { | ||||
std::unique_ptr<SigningProvider> provider = | |||||
GetSigningProvider(GetScriptForDestination(dest)); | |||||
if (provider) { | |||||
KeyOriginInfo orig; | |||||
CKeyID key_id = GetKeyForDestination(*provider, dest); | |||||
if (provider->GetKeyOrigin(key_id, orig)) { | |||||
LOCK(cs_desc_man); | |||||
std::unique_ptr<CKeyMetadata> meta = | |||||
std::make_unique<CKeyMetadata>(); | |||||
meta->key_origin = orig; | |||||
meta->has_key_origin = true; | |||||
meta->nCreateTime = m_wallet_descriptor.creation_time; | |||||
return meta; | |||||
} | |||||
} | |||||
return nullptr; | return nullptr; | ||||
} | } | ||||
uint256 DescriptorScriptPubKeyMan::GetID() const { | uint256 DescriptorScriptPubKeyMan::GetID() const { | ||||
LOCK(cs_desc_man); | LOCK(cs_desc_man); | ||||
std::string desc_str = m_wallet_descriptor.descriptor->ToString(); | std::string desc_str = m_wallet_descriptor.descriptor->ToString(); | ||||
uint256 id; | uint256 id; | ||||
CSHA256() | CSHA256() | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |