diff --git a/src/index/base.h b/src/index/base.h --- a/src/index/base.h +++ b/src/index/base.h @@ -26,6 +26,13 @@ */ class BaseIndex : public CValidationInterface { protected: + /** + * The database stores a block locator of the chain the database is synced + * to so that the TxIndex can efficiently determine the point it last + * stopped at. A locator is used instead of a simple hash of the chain tip + * because blocks and block index entries may not be flushed to disk until + * after this database is updated. + */ class DB : public CDBWrapper { public: DB(const fs::path &path, size_t n_cache_size, bool f_memory = false, diff --git a/src/index/disktxpos.h b/src/index/disktxpos.h --- a/src/index/disktxpos.h +++ b/src/index/disktxpos.h @@ -5,10 +5,8 @@ #ifndef BITCOIN_INDEX_DISKTXPOS_H #define BITCOIN_INDEX_DISKTXPOS_H -#include #include -#include -#include +#include struct CDiskTxPos : public FlatFilePos { unsigned int nTxOffset; // after header diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -19,15 +19,7 @@ std::unique_ptr g_txindex; -/** - * Access to the txindex database (indexes/txindex/) - * - * The database stores a block locator of the chain the database is synced to - * so that the TxIndex can efficiently determine the point it last stopped at. - * A locator is used instead of a simple hash of the chain tip because blocks - * and block index entries may not be flushed to disk until after this database - * is updated. - */ +/** Access to the txindex database (indexes/txindex/) */ class TxIndex::DB : public BaseIndex::DB { public: explicit DB(size_t n_cache_size, bool f_memory = false,