MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetNewChangeDestination

Method GetNewChangeDestination

src/wallet/wallet.cpp:2522–2538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2520}
2521
2522bool 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
2540std::optional<int64_t> CWallet::GetOldestKeyPoolTime() const
2541{

Callers 2

GetScriptPubKeyMethod · 0.80
getrawchangeaddressFunction · 0.80

Calls 5

GetScriptForDestinationFunction · 0.85
SetBlindingPubKeyMethod · 0.80
clearMethod · 0.45
KeepDestinationMethod · 0.45

Tested by 1

GetScriptPubKeyMethod · 0.64