1586@@ -1587,8 +1587,7 @@ bool AppInitMain()
1587
1588 // ********************************************************* Step 8: start indexers
1589 if (gArgs.GetBoolArg("-txindex", DEFAULT_TXINDEX)) {
1590- auto txindex_db = MakeUnique<TxIndexDB>(nTxIndexCache, false, fReindex);
1591- g_txindex = MakeUnique<TxIndex>(std::move(txindex_db));
1592+ g_txindex = MakeUnique<TxIndex>(nTxIndexCache, false, fReindex);
Why is this being changed?
I think it makes sense for the DB to be encapsulated in the index interface, even if it is implemented separately internally.
Agree with being encapsulated. It’s just a unrelated change AFAIU, but a nice to include.
Oh, sorry. The reason is that the TxIndex::DB
is protected now (at the end of the commit series), so can’t be independently instantiated in init.cpp.