| 681 | } |
| 682 | |
| 683 | std::unique_ptr<CKeyMetadata> LegacyScriptPubKeyMan::GetMetadata(const CTxDestination& dest) const |
| 684 | { |
| 685 | LOCK(cs_KeyStore); |
| 686 | |
| 687 | CKeyID key_id = GetKeyForDestination(*this, dest); |
| 688 | if (!key_id.IsNull()) { |
| 689 | auto it = mapKeyMetadata.find(key_id); |
| 690 | if (it != mapKeyMetadata.end()) { |
| 691 | return std::make_unique<CKeyMetadata>(it->second); |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | CScript scriptPubKey = GetScriptForDestination(dest); |
| 696 | auto it = m_script_metadata.find(CScriptID(scriptPubKey)); |
| 697 | if (it != m_script_metadata.end()) { |
| 698 | return std::make_unique<CKeyMetadata>(it->second); |
| 699 | } |
| 700 | |
| 701 | return nullptr; |
| 702 | } |
| 703 | |
| 704 | uint256 LegacyScriptPubKeyMan::GetID() const |
| 705 | { |
no test coverage detected