diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-06-25 13:45:29 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-07-01 12:48:16 +0200 |
commit | dd638dd712861a2fc419fe9b2b064ae303b074e6 (patch) | |
tree | 399148512c76f75fd7f84ee25cd06c9ac61ac843 /src/txdb.cpp | |
parent | 8d9cc7d743583f6cb72d224af458fa5f470b00e8 (diff) |
typedef std::map<uint256, CCoins> to CCoinsMap
This makes it possible to switch to a more efficient map type
without changing all occurences manually.
Merges half of #4413.
Diffstat (limited to 'src/txdb.cpp')
-rw-r--r-- | src/txdb.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index 92137f71ff..52cd96283e 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -54,11 +54,11 @@ bool CCoinsViewDB::SetBestBlock(const uint256 &hashBlock) { return db.WriteBatch(batch); } -bool CCoinsViewDB::BatchWrite(const std::map<uint256, CCoins> &mapCoins, const uint256 &hashBlock) { +bool CCoinsViewDB::BatchWrite(const CCoinsMap &mapCoins, const uint256 &hashBlock) { LogPrint("coindb", "Committing %u changed transactions to coin database...\n", (unsigned int)mapCoins.size()); CLevelDBBatch batch; - for (std::map<uint256, CCoins>::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++) + for (CCoinsMap::const_iterator it = mapCoins.begin(); it != mapCoins.end(); it++) BatchWriteCoins(batch, it->first, it->second); if (hashBlock != uint256(0)) BatchWriteHashBestChain(batch, hashBlock); |