aboutsummaryrefslogtreecommitdiff
path: root/src/index/txindex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/index/txindex.h')
-rw-r--r--src/index/txindex.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/index/txindex.h b/src/index/txindex.h
index 2a0c70e9d1..8202c3c951 100644
--- a/src/index/txindex.h
+++ b/src/index/txindex.h
@@ -5,7 +5,9 @@
#ifndef BITCOIN_INDEX_TXINDEX_H
#define BITCOIN_INDEX_TXINDEX_H
+#include <chain.h>
#include <index/base.h>
+#include <txdb.h>
/**
* TxIndex is used to look up transactions included in the blockchain by hash.
@@ -14,8 +16,11 @@
*/
class TxIndex final : public BaseIndex
{
+protected:
+ class DB;
+
private:
- const std::unique_ptr<TxIndexDB> m_db;
+ const std::unique_ptr<DB> m_db;
protected:
/// Override base class init to migrate from old database.
@@ -23,7 +28,7 @@ protected:
bool WriteBlock(const CBlock& block, const CBlockIndex* pindex) override;
- BaseIndexDB& GetDB() const override;
+ BaseIndex::DB& GetDB() const override;
const char* GetName() const override { return "txindex"; }
@@ -31,6 +36,9 @@ public:
/// Constructs the index, which becomes available to be queried.
explicit TxIndex(size_t n_cache_size, bool f_memory = false, bool f_wipe = false);
+ // Destructor is declared because this class contains a unique_ptr to an incomplete type.
+ virtual ~TxIndex() override;
+
/// Look up a transaction by hash.
///
/// @param[in] tx_hash The hash of the transaction to be returned.