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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.May 5 2019, 23:45
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 5 2019, 23:45
markblundeberg planned changes to this revision.Thu, May 23, 23:08

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

note to self: remove unsigned chars!

rebased; de-charred

markblundeberg edited the summary of this revision. (Show Details)Mon, May 27, 02:17
markblundeberg added inline comments.Mon, May 27, 03:11
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.Mon, May 27, 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.Mon, May 27, 21:26
markblundeberg marked 2 inline comments as done.Tue, May 28, 02:31
markblundeberg updated this revision to Diff 8947.

remove txindex.h dependency on chain.h

markblundeberg added inline comments.Tue, May 28, 02:33
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.

deadalnix added inline comments.Tue, May 28, 15:26
src/index/base.cpp
5 ↗(On Diff #8902)

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

deadalnix accepted this revision.Tue, May 28, 15:27
This revision is now accepted and ready to land.Tue, May 28, 15:27
markblundeberg added inline comments.Tue, May 28, 16:12
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.