MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetPubKey

Method GetPubKey

src/wallet/scriptpubkeyman.cpp:1040–1058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1038}
1039
1040bool LegacyScriptPubKeyMan::GetPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
1041{
1042 LOCK(cs_KeyStore);
1043 if (!m_storage.HasEncryptionKeys()) {
1044 if (!FillableSigningProvider::GetPubKey(address, vchPubKeyOut)) {
1045 return GetWatchPubKey(address, vchPubKeyOut);
1046 }
1047 return true;
1048 }
1049
1050 CryptedKeyMap::const_iterator mi = mapCryptedKeys.find(address);
1051 if (mi != mapCryptedKeys.end())
1052 {
1053 vchPubKeyOut = (*mi).second.first;
1054 return true;
1055 }
1056 // Check for watch-only pubkeys
1057 return GetWatchPubKey(address, vchPubKeyOut);
1058}
1059
1060CPubKey LegacyScriptPubKeyMan::GenerateNewKey(WalletBatch &batch, CHDChain& hd_chain, bool internal)
1061{

Callers 15

IsMineInnerFunction · 0.45
EncryptMethod · 0.45
UpgradeKeyMetadataMethod · 0.45
GenerateNewKeyMethod · 0.45
DeriveNewChildKeyMethod · 0.45
DeriveNewSeedMethod · 0.45
ImportPrivKeysMethod · 0.45
AddWalletDescriptorMethod · 0.45
ComputeBlindingDataMethod · 0.45
GetBlindingPubKeyMethod · 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
BOOST_AUTO_TEST_CASEFunction · 0.36
ListCoinsTestingSetupMethod · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_FIXTURE_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36