HomePhabricator

[refactor] move ReadBlockFromDisk+ from validation.cpp

Description

[refactor] move ReadBlockFromDisk+ from validation.cpp

Summary:
Upcoming Core PR16443 makes validation.h #include <txdb.h>, which has
the unwelcome effect of making zmq transitively #include <leveldb/db.h>
which cmake helpfully doesn't make available to it.

turns out zmqpublishnotifier.cpp (the only translation unit requiring
validation.h) needs it only for ReadBlockFrom disk.

This looks like a good place to start to cut things out of
the validation TU which is basically responsible for everything right
now.

This diff moves a few functions related to handling block files into the
(tentatively named) readblockfromdisk.cpp translation unit so that
zmqpublishnotifier.cpp no longer pulls leveldb transitively.

Test Plan:

ninja check check-functional

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7579

Details

Provenance
majcostaAuthored on Oct 15 2020, 23:38
abc-botPushed on Oct 15 2020, 23:43
Reviewer
Restricted Project
Differential Revision
D7579: [refactor] move ReadBlockFromDisk+ from validation.cpp
Parents
rABC1cb2090b019b: [wallet] Remove locked_chain from CWallet, its RPCs and tests
Branches
Unknown
Tags
Unknown