diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-05 15:14:48 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-15 17:48:38 +0200 |
commit | 99e70751f23aa59ac297f6746dd8f09a140d48ae (patch) | |
tree | 2be46a38d1150ab1a07ba6871931194661464f0f /src/main.cpp | |
parent | 73fc922ed64333d45f18d8a448f30cfa2ae0281e (diff) | |
download | bitcoin-99e70751f23aa59ac297f6746dd8f09a140d48ae.tar.xz |
Break circular dependency main ↔ txdb
Break the circular dependency between main and txdb by:
- Moving `CBlockFileInfo` from `main.h` to `chain.h`. I think this makes
sense, as the other block-file stuff is there too.
- Moving `CDiskTxPos` from `main.h` to `txdb.h`. This type seems
specific to txdb.
- Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves
it up to the caller how to insert block indices.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index a94d52f895..2db726cb45 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3706,7 +3706,7 @@ CBlockIndex * InsertBlockIndex(uint256 hash) bool static LoadBlockIndexDB() { const CChainParams& chainparams = Params(); - if (!pblocktree->LoadBlockIndexGuts()) + if (!pblocktree->LoadBlockIndexGuts(InsertBlockIndex)) return false; boost::this_thread::interruption_point(); |