| 2581 | } |
| 2582 | |
| 2583 | bool ReserveDestination::GetReservedDestination(CTxDestination& dest, bool internal, bilingual_str& error) |
| 2584 | { |
| 2585 | m_spk_man = pwallet->GetScriptPubKeyMan(type, internal); |
| 2586 | if (!m_spk_man) { |
| 2587 | error = strprintf(_("Error: No %s addresses available."), FormatOutputType(type)); |
| 2588 | return false; |
| 2589 | } |
| 2590 | |
| 2591 | |
| 2592 | if (nIndex == -1) |
| 2593 | { |
| 2594 | m_spk_man->TopUp(); |
| 2595 | |
| 2596 | CKeyPool keypool; |
| 2597 | if (!m_spk_man->GetReservedDestination(type, internal, address, nIndex, keypool, error)) { |
| 2598 | return false; |
| 2599 | } |
| 2600 | fInternal = keypool.fInternal; |
| 2601 | } |
| 2602 | dest = address; |
| 2603 | return true; |
| 2604 | } |
| 2605 | |
| 2606 | void ReserveDestination::SetBlindingPubKey(const CPubKey& blinding_pubkey, CTxDestination& dest) |
| 2607 | { |
no test coverage detected