Page MenuHomePhabricator

[tests] remove txdb.h dependency from test_bitcoin.h
ClosedPublic

Authored by markblundeberg on May 7 2019, 03:43.

Details

Summary

txdb.h is the one unnecessary dependency in test_bitcoin.h. It brings in
some heavy dependencies via chain.h and coins.h that result in unnecessary
recompilation work when various headers are changed.

Unfortunately numerous tests were relying on hidden indirect imports via
test_bitcoin.h -> txdb.h -> ??, so these tests needed the correct headers
to be added in.

Test Plan

compile

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 7 2019, 03:43
Herald added a reviewer: Restricted Project. · View Herald TranscriptMay 7 2019, 03:43
markblundeberg planned changes to this revision.May 7 2019, 03:52

wasn't building qt on my build machine so I missed the qt tests ...

markblundeberg updated this revision to Diff 8453.May 7 2019, 06:48

fix qt test too

Fabien requested changes to this revision.May 7 2019, 07:10
Fabien added inline comments.
src/test/hash_tests.cpp
7 ↗(On Diff #8453)

Leave these 2 files in their own section, they are the purpose of the test

src/test/merkle_tests.cpp
6 ↗(On Diff #8453)

Dito, add a newline before the new include

src/test/sighashtype_tests.cpp
6 ↗(On Diff #8453)

Dito

This revision now requires changes to proceed.May 7 2019, 07:10
markblundeberg updated this revision to Diff 8463.May 7 2019, 14:56
markblundeberg marked 3 inline comments as done.

leave test-subject headers in first header block

Fabien accepted this revision.May 10 2019, 19:01
This revision is now accepted and ready to land.May 10 2019, 19:01
This revision was automatically updated to reflect the committed changes.