aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorMarko Bencun <[email protected]>2017-07-23 23:32:57 +0200
committerMarko Bencun <[email protected]>2017-07-23 23:38:52 +0200
commit5cb3da04b8882ca975b4e3d6c089c64bbaf67d0d (patch)
tree0f2c1118633a04ea7920cf6f0a523cb113a4b281 /src/wallet/wallet.cpp
parentMerge #10893: [QA] Avoid running multiwallet.py twice (diff)
downloaddiscoin-5cb3da04b8882ca975b4e3d6c089c64bbaf67d0d.tar.xz
discoin-5cb3da04b8882ca975b4e3d6c089c64bbaf67d0d.zip
keystore GetKeys(): return result instead of writing to reference
Issue: #10905 By returning the result, a few useless lines can be removed. Return-value-optimization means there should be no copy.
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 223790aa4..fcb679e75 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -3660,13 +3660,10 @@ void CWallet::GetKeyBirthTimes(std::map<CTxDestination, int64_t> &mapKeyBirth) c
// map in which we'll infer heights of other keys
CBlockIndex *pindexMax = chainActive[std::max(0, chainActive.Height() - 144)]; // the tip can be reorganized; use a 144-block safety margin
std::map<CKeyID, CBlockIndex*> mapKeyFirstBlock;
- std::set<CKeyID> setKeys;
- GetKeys(setKeys);
- for (const CKeyID &keyid : setKeys) {
+ for (const CKeyID &keyid : GetKeys()) {
if (mapKeyBirth.count(keyid) == 0)
mapKeyFirstBlock[keyid] = pindexMax;
}
- setKeys.clear();
// if there are no such keys, we're done
if (mapKeyFirstBlock.empty())