mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-24 22:04:30 +00:00
Clarify *(--.end()) iterator semantics in CWallet::TopUpKeyPool
This commit is contained in:
parent
28301b9780
commit
d40a72ccbb
@ -3141,10 +3141,10 @@ bool CWallet::TopUpKeyPool(unsigned int kpSize)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!setInternalKeyPool.empty()) {
|
if (!setInternalKeyPool.empty()) {
|
||||||
nEnd = *(--setInternalKeyPool.end()) + 1;
|
nEnd = *(setInternalKeyPool.rbegin()) + 1;
|
||||||
}
|
}
|
||||||
if (!setExternalKeyPool.empty()) {
|
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)))
|
if (!walletdb.WritePool(nEnd, CKeyPool(GenerateNewKey(internal), internal)))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user