MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / GetReservedKey

Method GetReservedKey

src/wallet/wallet.cpp:2480–2495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2478}
2479
2480bool CReserveKey::GetReservedKey(CPubKey& pubkey)
2481{
2482 if (nIndex == -1)
2483 {
2484 CKeyPool keypool;
2485 pwallet->ReserveKeyFromKeyPool(nIndex, keypool);
2486 if (nIndex != -1)
2487 vchPubKey = keypool.vchPubKey;
2488 else {
2489 return false;
2490 }
2491 }
2492 assert(vchPubKey.IsValid());
2493 pubkey = vchPubKey;
2494 return true;
2495}
2496
2497void CReserveKey::KeepKey()
2498{

Callers 3

CreateNewBlockWithKeyFunction · 0.80
getrawchangeaddressFunction · 0.80
CreateTransactionMethod · 0.80

Calls 2

ReserveKeyFromKeyPoolMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected