diff options
| author | Wladimir J. van der Laan <[email protected]> | 2016-05-06 10:02:57 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2016-05-06 10:03:09 +0200 |
| commit | efee32f38110965435c884a6bcf0f83695c4c75b (patch) | |
| tree | e1b985b21a579b5cd4d52b7a4c4586dbf1496b6c /src/txdb.cpp | |
| parent | Merge #7907: Optimize and Cleanup CScript::FindAndDelete (diff) | |
| parent | Break circular dependency main ↔ txdb (diff) | |
| download | discoin-efee32f38110965435c884a6bcf0f83695c4c75b.tar.xz discoin-efee32f38110965435c884a6bcf0f83695c4c75b.zip | |
Merge #7815: Break circular dependency main ↔ txdb
99e7075 Break circular dependency main ↔ txdb (Wladimir J. van der Laan)
Diffstat (limited to 'src/txdb.cpp')
| -rw-r--r-- | src/txdb.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/txdb.cpp b/src/txdb.cpp index 5fbaeb608..078c29def 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -5,10 +5,8 @@ #include "txdb.h" -#include "chain.h" #include "chainparams.h" #include "hash.h" -#include "main.h" #include "pow.h" #include "uint256.h" @@ -173,7 +171,7 @@ bool CBlockTreeDB::ReadFlag(const std::string &name, bool &fValue) { return true; } -bool CBlockTreeDB::LoadBlockIndexGuts() +bool CBlockTreeDB::LoadBlockIndexGuts(boost::function<CBlockIndex*(const uint256&)> insertBlockIndex) { boost::scoped_ptr<CDBIterator> pcursor(NewIterator()); @@ -187,8 +185,8 @@ bool CBlockTreeDB::LoadBlockIndexGuts() CDiskBlockIndex diskindex; if (pcursor->GetValue(diskindex)) { // Construct block index object - CBlockIndex* pindexNew = InsertBlockIndex(diskindex.GetBlockHash()); - pindexNew->pprev = InsertBlockIndex(diskindex.hashPrev); + CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash()); + pindexNew->pprev = insertBlockIndex(diskindex.hashPrev); pindexNew->nHeight = diskindex.nHeight; pindexNew->nFile = diskindex.nFile; pindexNew->nDataPos = diskindex.nDataPos; |