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

Function GetPubKey

src/script/sign.cpp:111–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111static bool GetPubKey(const SigningProvider& provider, const SignatureData& sigdata, const CKeyID& address, CPubKey& pubkey)
112{
113 // Look for pubkey in all partial sigs
114 const auto it = sigdata.signatures.find(address);
115 if (it != sigdata.signatures.end()) {
116 pubkey = it->second.first;
117 return true;
118 }
119 // Look for pubkey in pubkey list
120 const auto& pk_it = sigdata.misc_pubkeys.find(address);
121 if (pk_it != sigdata.misc_pubkeys.end()) {
122 pubkey = pk_it->second.first;
123 return true;
124 }
125 // Query the underlying provider
126 return provider.GetPubKey(address, pubkey);
127}
128
129static bool CreateSig(const BaseSignatureCreator& creator, SignatureData& sigdata, const SigningProvider& provider, std::vector<unsigned char>& sig_out, const CPubKey& pubkey, const CScript& scriptcode, SigVersion sigversion, unsigned int flags)
130{

Callers 8

DeriveMethod · 0.85
UpgradeKeyMetadataMethod · 0.85
GetPubKeyMethod · 0.85
KeepDestinationMethod · 0.85
ReserveKeyFromKeyPoolMethod · 0.85
ImportPubKeysMethod · 0.85
GetPubKeyByXOnlyMethod · 0.85
SignStepFunction · 0.85

Calls 3

findMethod · 0.80
endMethod · 0.45
GetPubKeyMethod · 0.45

Tested by

no test coverage detected