diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-05-15 09:11:04 +0200 |
---|---|---|
committer | Witchspace <witchspace81@gmail.com> | 2011-05-15 12:04:20 +0200 |
commit | 223b6f1ba4819e9a146e7aa451d546726d0bc714 (patch) | |
tree | 8d52eaba84ba2817d2227cf9fda0c71af75246cd /src/db.cpp | |
parent | c22feee634ade7f887d7e29635a8e5dc44675273 (diff) |
make bitcoin include files more modular
Diffstat (limited to 'src/db.cpp')
-rw-r--r-- | src/db.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/db.cpp b/src/db.cpp index 071231c5dd..52c0f5b4c3 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -4,6 +4,9 @@ #include "headers.h" +using namespace std; +using namespace boost; + void ThreadFlushWalletDB(void* parg); @@ -434,13 +437,13 @@ bool CTxDB::LoadBlockIndex() // Calculate bnChainWork vector<pair<int, CBlockIndex*> > vSortedByHeight; vSortedByHeight.reserve(mapBlockIndex.size()); - foreach(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) + BOOST_FOREACH(const PAIRTYPE(uint256, CBlockIndex*)& item, mapBlockIndex) { CBlockIndex* pindex = item.second; vSortedByHeight.push_back(make_pair(pindex->nHeight, pindex)); } sort(vSortedByHeight.begin(), vSortedByHeight.end()); - foreach(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight) + BOOST_FOREACH(const PAIRTYPE(int, CBlockIndex*)& item, vSortedByHeight) { CBlockIndex* pindex = item.second; pindex->bnChainWork = (pindex->pprev ? pindex->pprev->bnChainWork : 0) + pindex->GetBlockWork(); @@ -603,7 +606,7 @@ int64 CWalletDB::GetAccountCreditDebit(const string& strAccount) ListAccountCreditDebit(strAccount, entries); int64 nCreditDebit = 0; - foreach (const CAccountingEntry& entry, entries) + BOOST_FOREACH (const CAccountingEntry& entry, entries) nCreditDebit += entry.nCreditDebit; return nCreditDebit; @@ -796,7 +799,7 @@ bool CWalletDB::LoadWallet() pcursor->close(); } - foreach(uint256 hash, vWalletUpgrade) + BOOST_FOREACH(uint256 hash, vWalletUpgrade) WriteTx(hash, mapWallet[hash]); printf("nFileVersion = %d\n", nFileVersion); |