| 1452 | } |
| 1453 | |
| 1454 | std::unique_ptr<CKeyMetadata> DescriptorScriptPubKeyMan::GetMetadata(const CTxDestination& dest) const |
| 1455 | { |
| 1456 | std::unique_ptr<SigningProvider> provider = GetSigningProvider(GetScriptForDestination(dest)); |
| 1457 | if (provider) { |
| 1458 | KeyOriginInfo orig; |
| 1459 | CKeyID key_id = GetKeyForDestination(*provider, dest); |
| 1460 | if (provider->GetKeyOrigin(key_id, orig)) { |
| 1461 | LOCK(cs_desc_man); |
| 1462 | std::unique_ptr<CKeyMetadata> meta = std::make_unique<CKeyMetadata>(); |
| 1463 | meta->key_origin = orig; |
| 1464 | meta->has_key_origin = true; |
| 1465 | meta->nCreateTime = m_wallet_descriptor.creation_time; |
| 1466 | return meta; |
| 1467 | } |
| 1468 | } |
| 1469 | return nullptr; |
| 1470 | } |
| 1471 | |
| 1472 | uint256 DescriptorScriptPubKeyMan::GetID() const |
| 1473 | { |
no test coverage detected