Page MenuHomePhabricator

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

Authored by Fabien on Nov 19 2019, 11:26.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR13235_part2
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 8152
Build 14336: Default Diff Build & Tests
Build 14335: arc lint + arc unit

Event Timeline

Go on, trash my ccache :)

This revision is now accepted and ready to land.Nov 19 2019, 13:39

After breaking your depends (D4461) :)