HomePhabricator

Break circular dependency: init -> * -> init by extracting shutdown.h

Description

Break circular dependency: init -> * -> init by extracting shutdown.h

Summary:

Most includers just wanted to react to pending shutdown.

This isolates access to `fRequestShutdown` and limits access to the
shutdown
api functions, including the new `AbortShutdown` for setting it to
`false`.

Partial backport of core PR13235 (commit 1fabd59):
https://github.com/bitcoin/bitcoin/pull/13235/commits/1fabd59e7e870fae73bfbcfb227dd7452de94726

Depends on D4464.

Note to reviewers:
The Makefile/CMakeLists.txt change is obviously bad, because it is not
solving the circular dependency. Unfortunately solving this requires a
lot more backports that come after this one, so I leave it as is for
now.

Test Plan:

make check # autotools
ninja check
ninja bench-bitcoin

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
Ben Woosley <ben.woosley@gmail.com>Authored on May 16 2018, 19:17
FabienCommitted on Nov 19 2019, 14:15
FabienPushed on Nov 19 2019, 15:48
Reviewer
Restricted Project
Differential Revision
D4465: Break circular dependency: init -> * -> init by extracting shutdown.h
Parents
rSTAGING8130cbde42fb: Drop unused init.h includes
Branches
Unknown
Tags
Unknown