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

Method GetKey

src/wallet/wallet.cpp:4565–4578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4563}
4564
4565std::optional<CKey> CWallet::GetKey(const CKeyID& keyid) const
4566{
4567 Assert(IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS));
4568
4569 for (const auto& spkm : GetAllScriptPubKeyMans()) {
4570 const DescriptorScriptPubKeyMan* desc_spkm = dynamic_cast<DescriptorScriptPubKeyMan*>(spkm);
4571 assert(desc_spkm);
4572 LOCK(desc_spkm->cs_desc_man);
4573 if (std::optional<CKey> key = desc_spkm->GetKey(keyid)) {
4574 return key;
4575 }
4576 }
4577 return std::nullopt;
4578}
4579
4580void CWallet::WriteBestBlock() const
4581{

Callers 15

backup.cppFile · 0.45
gethdkeysFunction · 0.45
createwalletdescriptorFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
BOOST_AUTO_TEST_CASEFunction · 0.45
key.cppFile · 0.45
FUZZ_TARGETFunction · 0.45
VerifyIteratorFunction · 0.45
dbwrapper.cppFile · 0.45
operator==Method · 0.45
FindSpenderMethod · 0.45

Calls

no outgoing calls

Tested by 5

BOOST_AUTO_TEST_CASEFunction · 0.36
BOOST_AUTO_TEST_CASEFunction · 0.36
FUZZ_TARGETFunction · 0.36
VerifyIteratorFunction · 0.36
operator==Method · 0.36