0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-08 10:31:50 -05:00

wallet: Avoid updating ReserveDestination::nIndex when GetReservedDestination fails

This commit is contained in:
UdjinM6 2024-02-28 13:00:00 +03:00
parent ba907f96ad
commit 367bb7a80c
No known key found for this signature in database
GPG key ID: 83592BD1400D58D9

View file

@ -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;
}