[bitcoin/bitcoin] refactor: Removal of circular dependency between index/txindex, validation and index/base (#13942)

In each file, you’ll want to be sure each of the definitions used are included in the file directly or in the .h for that file if used there, or forward-declared. E.g. `#include ` in `validation_block_utils.h`
> Every .cpp and .h file should #include every header file it directly uses classes, functions or other definitions from, even if those headers are already included indirectly through other headers.`
https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md

I’m concerned about the fact that the globals are still set in `validation.cpp`. Seems moving those to `validation_globals.cpp` would be more consistent with that file’s purpose of containing and presenting the globals. One idea is to rename `validation_block_utils.h` to `chainstate.h` and move `g_chainstate`, `mapBlockIndex` and `chainActive` out to it.

Добавить комментарий