diff options
author | Ryan Ofsky <ryan@ofsky.org> | 2022-01-13 07:57:54 -0500 |
---|---|---|
committer | Ryan Ofsky <ryan@ofsky.org> | 2022-07-18 13:39:55 -0500 |
commit | 33b4d48cfcdf145f49cb2283ac3e2936a4e23fff (patch) | |
tree | 482ca2545df1e67a06a7d027cc2275f89ae0cb75 /src/index/txindex.cpp | |
parent | a0b5b4ae5a24536d333cbce2ea584f2d935c651f (diff) | |
download | bitcoin-33b4d48cfcdf145f49cb2283ac3e2936a4e23fff.tar.xz |
indexes, refactor: Pass Chain interface instead of CChainState class to indexes
Passing abstract Chain interface will let indexes run in separate
processes.
This commit does not change behavior in any way.
Diffstat (limited to 'src/index/txindex.cpp')
-rw-r--r-- | src/index/txindex.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index/txindex.cpp b/src/index/txindex.cpp index 97c11c4383..4039588586 100644 --- a/src/index/txindex.cpp +++ b/src/index/txindex.cpp @@ -48,8 +48,8 @@ bool TxIndex::DB::WriteTxs(const std::vector<std::pair<uint256, CDiskTxPos>>& v_ return WriteBatch(batch); } -TxIndex::TxIndex(size_t n_cache_size, bool f_memory, bool f_wipe) - : m_db(std::make_unique<TxIndex::DB>(n_cache_size, f_memory, f_wipe)) +TxIndex::TxIndex(std::unique_ptr<interfaces::Chain> chain, size_t n_cache_size, bool f_memory, bool f_wipe) + : BaseIndex(std::move(chain)), m_db(std::make_unique<TxIndex::DB>(n_cache_size, f_memory, f_wipe)) {} TxIndex::~TxIndex() = default; |