Skip to content

Commit

Permalink
Merge bitcoin#19733: Move comment about BaseIndex::DB from TxIndex::DB
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fanquake authored and gades committed May 2, 2022
1 parent bef7b25 commit cf54acf
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
7 changes: 7 additions & 0 deletions src/index/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ class CBlockIndex;
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:
Expand Down
4 changes: 1 addition & 3 deletions src/index/disktxpos.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
12 changes: 3 additions & 9 deletions src/index/txindex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,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:
Expand Down

0 comments on commit cf54acf

Please sign in to comment.