Skip to content

Commit

Permalink
wallet: Avoid updating ReserveDestination::nIndex when `GetReserved…
Browse files Browse the repository at this point in the history
…Destination` fails
  • Loading branch information
UdjinM6 committed Feb 28, 2024
1 parent ba907f9 commit 367bb7a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2607,8 +2607,10 @@ util::Result<CTxDestination> ReserveDestination::GetReservedDestination(bool int

if (nIndex == -1) {
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;
nIndex = index;
address = *op_address;
fInternal = keypool.fInternal;
}
Expand Down

0 comments on commit 367bb7a

Please sign in to comment.