wallet: Avoid updating ReserveDestination::nIndex when GetReservedDestination fails
This commit is contained in:
1 file changed
+3
-1
@@ -2607,8 +2607,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user