diff options
| author | Matt Corallo <[email protected]> | 2017-07-11 12:02:42 -0400 |
|---|---|---|
| committer | Matt Corallo <[email protected]> | 2017-07-14 21:25:24 -0400 |
| commit | d40a72ccbb71d61b43cbf4d222ca2ab5d3ca7510 (patch) | |
| tree | c82233f12fba4065e08dcdd2753e0adcb79da6e2 /src/wallet/wallet.cpp | |
| parent | Meet code style on lines changed in the previous commit (diff) | |
| download | discoin-d40a72ccbb71d61b43cbf4d222ca2ab5d3ca7510.tar.xz discoin-d40a72ccbb71d61b43cbf4d222ca2ab5d3ca7510.zip | |
Clarify *(--.end()) iterator semantics in CWallet::TopUpKeyPool
Diffstat (limited to 'src/wallet/wallet.cpp')
| -rw-r--r-- | src/wallet/wallet.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 61d975246..63d0a3c0c 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))) |