net: Add -networkactive option
Summary:
Some Bitcoin activity is completely local (offline), e.g., reindexing.
The setnetworkactive RPC command is already present. This PR adds the corresponding command-line argument / config option, and allows to start the client with disabled p2p network by providing -networkactive=0 or -nonetworkactive.
Commit message #1:
net: Add -networkactive option
The `setnetworkactive' RPC command is already present.
This new option allows to start the client with disabled p2p network
activity for testing or reindexing.
Commit message #2:
net: Log network activity status change unconditionally
Commit message #3:
test: Add test coverage for -networkactive option
This is a backport of core#19473
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D9713