| 2478 | } |
| 2479 | |
| 2480 | bool 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 | |
| 2497 | void CReserveKey::KeepKey() |
| 2498 | { |
no test coverage detected