mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
wallet: Avoid updating ReserveDestination::nIndex
when GetReservedDestination
fails
Github-Pull: #29510
Rebased-From: 367bb7a80c
This commit is contained in:
parent
b5419ce6b6
commit
7c82b2758c
1 changed files with 3 additions and 1 deletions
|
@ -2561,8 +2561,10 @@ util::Result<CTxDestination> ReserveDestination::GetReservedDestination(bool int
|
||||||
|
|
||||||
if (nIndex == -1) {
|
if (nIndex == -1) {
|
||||||
CKeyPool keypool;
|
CKeyPool keypool;
|
||||||
auto op_address = m_spk_man->GetReservedDestination(type, internal, nIndex, keypool);
|
int64_t index;
|
||||||
|
auto op_address = m_spk_man->GetReservedDestination(type, internal, index, keypool);
|
||||||
if (!op_address) return op_address;
|
if (!op_address) return op_address;
|
||||||
|
nIndex = index;
|
||||||
address = *op_address;
|
address = *op_address;
|
||||||
fInternal = keypool.fInternal;
|
fInternal = keypool.fInternal;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue