File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 8
8
9
9
std::unique_ptr<TxIndex> g_txindex;
10
10
11
- TxIndex::TxIndex (std::unique_ptr<TxIndexDB> db) : m_db(std::move(db)) {}
11
+ TxIndex::TxIndex (size_t n_cache_size, bool f_memory, bool f_wipe)
12
+ : m_db(MakeUnique<TxIndex::DB>(n_cache_size, f_memory, f_wipe))
13
+ {}
12
14
13
15
bool TxIndex::Init ()
14
16
{
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ class TxIndex final : public BaseIndex
29
29
30
30
public:
31
31
// / Constructs the index, which becomes available to be queried.
32
- explicit TxIndex (std::unique_ptr<TxIndexDB> db );
32
+ explicit TxIndex (size_t n_cache_size, bool f_memory = false , bool f_wipe = false );
33
33
34
34
// / Look up a transaction by hash.
35
35
// /
Original file line number Diff line number Diff line change @@ -1606,8 +1606,7 @@ bool AppInitMain()
1606
1606
1607
1607
// ********************************************************* Step 8: start indexers
1608
1608
if (gArgs .GetBoolArg (" -txindex" , DEFAULT_TXINDEX)) {
1609
- auto txindex_db = MakeUnique<TxIndexDB>(nTxIndexCache, false , fReindex );
1610
- g_txindex = MakeUnique<TxIndex>(std::move (txindex_db));
1609
+ g_txindex = MakeUnique<TxIndex>(nTxIndexCache, false , fReindex );
1611
1610
g_txindex->Start ();
1612
1611
}
1613
1612
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ BOOST_AUTO_TEST_SUITE(txindex_tests)
15
15
16
16
BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup)
17
17
{
18
- TxIndex txindex (MakeUnique<TxIndexDB>( 1 << 20 , true ) );
18
+ TxIndex txindex (1 << 20 , true );
19
19
20
20
CTransactionRef tx_disk;
21
21
uint256 block_hash;
You can’t perform that action at this time.
0 commit comments