| 2520 | } |
| 2521 | |
| 2522 | bool CWallet::GetNewChangeDestination(const OutputType type, CTxDestination& dest, bilingual_str& error, bool add_blinding_key) |
| 2523 | { |
| 2524 | LOCK(cs_wallet); |
| 2525 | error.clear(); |
| 2526 | |
| 2527 | ReserveDestination reservedest(this, type); |
| 2528 | if (!reservedest.GetReservedDestination(dest, true, error)) { |
| 2529 | return false; |
| 2530 | } |
| 2531 | if (add_blinding_key) { |
| 2532 | CPubKey blinding_pubkey = GetBlindingPubKey(GetScriptForDestination(dest)); |
| 2533 | reservedest.SetBlindingPubKey(blinding_pubkey, dest); |
| 2534 | } |
| 2535 | |
| 2536 | reservedest.KeepDestination(); |
| 2537 | return true; |
| 2538 | } |
| 2539 | |
| 2540 | std::optional<int64_t> CWallet::GetOldestKeyPoolTime() const |
| 2541 | { |