aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 61d9752460..63d0a3c0c4 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3141,10 +3141,10 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
}
if (!setInternalKeyPool.empty()) {
- nEnd = *(--setInternalKeyPool.end()) + 1;
+ nEnd = *(setInternalKeyPool.rbegin()) + 1;
}
if (!setExternalKeyPool.empty()) {
- nEnd = std::max(nEnd, *(--setExternalKeyPool.end()) + 1);
+ nEnd = std::max(nEnd, *(setExternalKeyPool.rbegin()) + 1);
}
if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey(internal), internal)))