diff options
author | Jim Posen <jim.posen@gmail.com> | 2018-05-15 17:20:17 -0700 |
---|---|---|
committer | Jim Posen <jim.posen@gmail.com> | 2018-06-04 19:22:30 -0700 |
commit | ec3073a274bf7affe1b8c87a10f75d126f5ac027 (patch) | |
tree | 9f56192c49d79d2c23a5618b8b663926bc1b9fb2 /src/index/txindex.h | |
parent | 89eddcd365e9a2218648f5cc5b9f22b28023f50a (diff) | |
download | bitcoin-ec3073a274bf7affe1b8c87a10f75d126f5ac027.tar.xz |
index: Move index DBs into index/ directory.
Diffstat (limited to 'src/index/txindex.h')
-rw-r--r-- | src/index/txindex.h | 12 |
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. |