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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

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 marked 3 inline comments as done.

leave test-subject headers in first header block

This revision is now accepted and ready to land.May 10 2019, 19:01