Skip to content

Commit 71df8f2

Browse files
fanquakevijaydasmp
authored andcommitted
Merge bitcoin#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#14053. ACKs for top commit: fanquake: ACK 8ed2f1e Tree-SHA512: cb4e2b916c7ab996961cc2e1d910bc4b8a1700eb32b70fc1657ca720117a7a84f7337fe5e4fb30e047aa92c31eaa976eaaa5cb8f861877f2ff6f4a59bb94f4e9
1 parent feddd3c commit 71df8f2

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

src/index/base.h

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ class CBlockIndex;
2222
class BaseIndex : public CValidationInterface
2323
{
2424
protected:
25+
/**
26+
* The database stores a block locator of the chain the database is synced to
27+
* so that the index can efficiently determine the point it last stopped at.
28+
* A locator is used instead of a simple hash of the chain tip because blocks
29+
* and block index entries may not be flushed to disk until after this database
30+
* is updated.
31+
*/
2532
class DB : public CDBWrapper
2633
{
2734
public:

src/index/disktxpos.h

+1-3
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

+3-9
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@ constexpr char DB_TXINDEX_BLOCK = 'T';
1717

1818
std::unique_ptr<TxIndex> g_txindex;
1919

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

0 commit comments

Comments
 (0)