Page MenuHomePhabricator

index: Move index DBs into index/ directory.
ClosedPublic

Authored by markblundeberg on May 5 2019, 23:45.

Details

Summary

backports last two commits from PR13243:
ec3073a27 index: Move index DBs into index/ directory.
89eddcd36 index: Remove TxIndexDB from public interface of TxIndex.
https://github.com/bitcoin/bitcoin/compare/89eddcd36~1..ec3073a27

(these diffs are co-dependent and need to be brought in as one)

Depends on D2933 D2934 D2937 , and D2932

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

note to self: needs to be updated appropriately if D3115 is wanted.

note to self: remove unsigned chars!

src/index/txindex.cpp
137 ↗(On Diff #8902)

note -- added in D3115; I have moved it up a line here to make debug.log cleaner (doesn't appear between [0%] and [10]% logs)

deadalnix requested changes to this revision.May 27 2019, 21:26
deadalnix added inline comments.
src/index/base.cpp
5 ↗(On Diff #8902)

Remove.

src/index/txindex.h
8 ↗(On Diff #8902)

Remove

This revision now requires changes to proceed.May 27 2019, 21:26
markblundeberg marked 2 inline comments as done.

remove txindex.h dependency on chain.h

src/index/base.cpp
5 ↗(On Diff #8902)

this one is needed for CBlockIndex definition; stuff like chain_tip->nHeight occurs in the file.

src/index/txindex.h
8 ↗(On Diff #8902)

You're right; this one is happy just inheriting a forward declaration of CBlockIndex from index/base.h.

src/index/base.cpp
5 ↗(On Diff #8902)

None of the added code use CBlockIndex. Is that because txdb.h transitively included it?

This revision is now accepted and ready to land.May 28 2019, 15:27
src/index/base.cpp
5 ↗(On Diff #8902)

Yes it would appear so -- however txdb .h doesn't actually need to include chain.h interestingly enough, see D3142.