Ben Woosley 1fabd59e7e
Break circular dependency: init -> * -> init by extracting shutdown.h
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`.

Note I originally called `AbortShutdown` `CancelShutdown` but that name was
already taken by winuser.h
https://travis-ci.org/bitcoin/bitcoin/jobs/386913329

This change also triggered a build error in bench. Fixing it required moving LIBBITCOIN_SERVER after LIBBITCOIN_WALLET in bench_bench_bitcoin_LDADD To make
server definitions in src/net.cpp available to wallet methods in
src/wallet/wallet.cpp. Specifically, solving:

  libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): In function `CWalletTx::RelayWalletTransaction(CConnman*)':
  wallet.cpp:(.text+0x3f0e): undefined reference to `CConnman::NodeFullyConnected(CNode const*)'
  collect2: error: ld returned 1 exit status

https://travis-ci.org/bitcoin/bitcoin/jobs/392133581

Need for remaining init.h includes confirmed via a thorough search with a more
specific regex:
  \bInterrupt\(\)|\bShutdown\(\)|\bInitLogging\(\)|\bInitParameterInteraction\(\)|\bAppInitBasicSetup\(\)|\bAppInitParameterInteraction\(\)|\bAppInitSanityChecks\(\)|\bAppInitLockDataDirectory\(\)|\bAppInitMain\(\)|\bSetupServerArgs\(\)|\bLicenseInfo\(\)|g_wallet_init_interface|init.h
2018-06-25 00:08:49 -04:00
..
2018-06-24 19:25:03 +02:00
2018-02-16 08:59:28 -05:00
2017-09-29 16:02:39 +02:00
2018-06-13 09:58:54 -04:00
2018-02-10 09:55:54 -05:00
2018-03-06 21:52:53 +01:00
2018-06-05 02:16:24 -07:00
2018-03-21 11:57:57 +08:00
2018-06-04 14:55:00 -04:00
2018-05-06 13:55:33 +02:00
2018-02-11 10:48:15 +01:00
2018-03-06 19:52:19 +00:00
2018-03-06 19:52:19 +00:00
2018-03-13 17:04:31 -07:00
2018-04-16 13:24:14 -07:00
2018-03-13 17:04:31 -07:00
2018-05-19 11:16:00 -04:00
2018-06-25 00:08:00 -04:00
2018-04-16 13:24:14 -07:00
2018-04-16 13:24:14 -07:00
2018-03-21 08:34:44 +02:00
2018-03-06 20:28:08 -08:00