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

Method GetReservedKey

src/wallet.cpp:3944–3964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3942}
3943
3944bool CReserveKey::GetReservedKey(CPubKey& pubkey, bool internal)
3945{
3946 if (nIndex == -1) {
3947 CKeyPool keypool;
3948 pwallet->ReserveKeyFromKeyPool(nIndex, keypool, internal);
3949 if (nIndex != -1) {
3950 vchPubKey = keypool.vchPubKey;
3951 } else {
3952 return false;
3953 }
3954 //vchPubKey = keypool.vchPubKey;
3955 internal = keypool.internal;
3956 }
3957
3958 if(!vchPubKey.IsValid()) {
3959 LogPrintf("%s: vchPubKey is invalid\n", __func__);
3960 return false;
3961 }
3962 pubkey = vchPubKey;
3963 return true;
3964}
3965
3966void CReserveKey::KeepKey()
3967{

Callers 10

getrawchangeaddressFunction · 0.80
CreateNewBlockWithKeyMethod · 0.80
CreateTransactionMethod · 0.80
GetScriptForMiningMethod · 0.80
getworkFunction · 0.80
MakeCollateralAmountsMethod · 0.80
CreateDenominatedMethod · 0.80

Calls 2

ReserveKeyFromKeyPoolMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected