MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetPubKey

Method GetPubKey

src/wallet/scriptpubkeyman.cpp:443–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

441}
442
443bool LegacyDataSPKM::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
444{
445 LOCK(cs_KeyStore);
446 if (!m_storage.HasEncryptionKeys()) {
447 if (!FillableSigningProvider::GetPubKey(address, vchPubKeyOut)) {
448 return GetWatchPubKey(address, vchPubKeyOut);
449 }
450 return true;
451 }
452
453 CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
454 if (mi != mapCryptedKeys.end())
455 {
456 vchPubKeyOut = (*mi).second.first;
457 return true;
458 }
459 // Check for watch-only pubkeys
460 return GetWatchPubKey(address, vchPubKeyOut);
461}
462
463std::unordered_set<CScript, SaltedSipHasher> LegacyDataSPKM::GetCandidateScriptPubKeys() const
464{

Callers 15

MigrateToDescriptorMethod · 0.45
EncryptMethod · 0.45
ListCoinsFunction · 0.45
getPubKeyMethod · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_FIXTURE_TEST_CASEFunction · 0.45

Calls 4

GetPubKeyFunction · 0.85
HasEncryptionKeysMethod · 0.80
findMethod · 0.80
endMethod · 0.45

Tested by 15

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
ListCoinsTestingSetupMethod · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36