MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetPubKey

Method GetPubKey

src/key.cpp:170–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170CPubKey CKey::GetPubKey() const {
171 assert(fValid);
172 secp256k1_pubkey pubkey;
173 CPubKey result;
174 size_t clen = 65;
175 int ret = secp256k1_ec_pubkey_create(secp256k1_context_sign, &pubkey, begin());
176 assert(ret);
177 secp256k1_ec_pubkey_serialize(secp256k1_context_sign, (unsigned char*)result.begin(), &clen, &pubkey, fCompressed ? SECP256K1_EC_COMPRESSED : SECP256K1_EC_UNCOMPRESSED);
178 assert(result.size() == clen);
179 assert(result.IsValid());
180 return result;
181}
182
183bool CKey::SignECDSA(const uint256& hash, std::vector<uint8_t>& vchSig, uint32_t test_case) const {
184 if (!fValid)

Callers 15

BIP38_DecryptFunction · 0.45
IsMineFunction · 0.45
operator()Method · 0.45
DeriveMethod · 0.45
NeuterMethod · 0.45
ECC_InitSanityCheckFunction · 0.45
importprivkeyFunction · 0.45
importwalletFunction · 0.45
bip38decryptFunction · 0.45
GetVinFromOutputMethod · 0.45
SetKeyMethod · 0.45
CreateCoinStakeMethod · 0.45

Calls 6

beginFunction · 0.85
beginMethod · 0.45
sizeMethod · 0.45
IsValidMethod · 0.45

Tested by 10

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
SetupDummyInputsFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
KeyDataMethod · 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