diff options
author | fanquake <fanquake@gmail.com> | 2020-08-21 12:08:38 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-08-21 12:48:46 +0800 |
commit | 0d9e14a6466cd1644cb659b7b79d40d8761034c0 (patch) | |
tree | c4abe62a0b2e081b4b02c3da2b63b0781e03b783 /src | |
parent | 27eeb0337b083713879645bcdb28b046e91d631c (diff) | |
parent | 8ed2f1ed78937eff0bb8b5318a30da908e33af24 (diff) |
Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB
8ed2f1ed78937eff0bb8b5318a30da908e33af24 Remove unused includes (Marcin Jachymiak)
cf095a53fcef8ad72e2f1177660ef50bc7e340ad Move comment about BaseIndex::DB from TxIndex::DB (Marcin Jachymiak)
Pull request description:
Moves a comment about the `BaseIndex::DB` from the `TxIndex::DB` into the correct place. Originally part of https://github.com/bitcoin/bitcoin/pull/14053.
ACKs for top commit:
fanquake:
ACK 8ed2f1ed78937eff0bb8b5318a30da908e33af24
Tree-SHA512: cb4e2b916c7ab996961cc2e1d910bc4b8a1700eb32b70fc1657ca720117a7a84f7337fe5e4fb30e047aa92c31eaa976eaaa5cb8f861877f2ff6f4a59bb94f4e9
Diffstat (limited to 'src')
-rw-r--r-- | src/index/base.h | 7 | ||||
-rw-r--r-- | src/index/disktxpos.h | 4 | ||||
-rw-r--r-- | src/index/txindex.cpp | 12 |
3 files changed, 11 insertions, 12 deletions
diff --git a/src/index/base.h b/src/index/base.h index 74bc1ebfd2..8559e3cb64 100644 --- a/src/index/base.h +++ b/src/index/base.h @@ -27,6 +27,13 @@ struct IndexSummary { class BaseIndex : public CValidationInterface { protected: + /** + * The database stores a block locator of the chain the database is synced to + * so that the index 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: diff --git a/src/index/disktxpos.h b/src/index/disktxpos.h index 8cd2270028..69696b0ec5 100644 --- 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 <chain.h> #include <flatfile.h> -#include <primitives/block.h> -#include <primitives/transaction.h> +#include <serialize.h> struct CDiskTxPos : public FlatFilePos { diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 104b05d4ba..462ac5962f 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -16,15 +16,9 @@ constexpr char DB_TXINDEX_BLOCK = 'T'; std::unique_ptr<TxIndex> 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: |