Skip to content

Commit 0d9e14a

Browse files
committed
Merge #19733: Move comment about BaseIndex::DB from TxIndex::DB
8ed2f1e Remove unused includes (Marcin Jachymiak) cf095a5 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 bitcoin/bitcoin#14053. ACKs for top commit: fanquake: ACK 8ed2f1e Tree-SHA512: cb4e2b916c7ab996961cc2e1d910bc4b8a1700eb32b70fc1657ca720117a7a84f7337fe5e4fb30e047aa92c31eaa976eaaa5cb8f861877f2ff6f4a59bb94f4e9
2 parents 27eeb03 + 8ed2f1e commit 0d9e14a

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/index/base.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ struct IndexSummary {
2727
class BaseIndex : public CValidationInterface
2828
{
2929
protected:
30+
/**
31+
* The database stores a block locator of the chain the database is synced to
32+
* so that the index can efficiently determine the point it last stopped at.
33+
* A locator is used instead of a simple hash of the chain tip because blocks
34+
* and block index entries may not be flushed to disk until after this database
35+
* is updated.
36+
*/
3037
class DB : public CDBWrapper
3138
{
3239
public:

src/index/disktxpos.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
#ifndef BITCOIN_INDEX_DISKTXPOS_H
66
#define BITCOIN_INDEX_DISKTXPOS_H
77

8-
#include <chain.h>
98
#include <flatfile.h>
10-
#include <primitives/block.h>
11-
#include <primitives/transaction.h>
9+
#include <serialize.h>
1210

1311
struct CDiskTxPos : public FlatFilePos
1412
{

src/index/txindex.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@ constexpr char DB_TXINDEX_BLOCK = 'T';
1616

1717
std::unique_ptr<TxIndex> g_txindex;
1818

19-
/**
20-
* Access to the txindex database (indexes/txindex/)
21-
*
22-
* The database stores a block locator of the chain the database is synced to
23-
* so that the TxIndex can efficiently determine the point it last stopped at.
24-
* A locator is used instead of a simple hash of the chain tip because blocks
25-
* and block index entries may not be flushed to disk until after this database
26-
* is updated.
27-
*/
19+
20+
21+
/** Access to the txindex database (indexes/txindex/) */
2822
class TxIndex::DB : public BaseIndex::DB
2923
{
3024
public:

0 commit comments

Comments
 (0)