HomePhabricator

net: Add -networkactive option

Description

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

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Jul 9 2020, 07:07
PiRKCommitted on Jul 1 2021, 06:25
PiRKPushed on Jul 1 2021, 06:25
Reviewer
Restricted Project
Differential Revision
D9713: net: Add -networkactive option
Parents
rABCd67dd117ed30: [Automated] Update timing.json
Branches
Unknown
Tags
Unknown

Event Timeline

PiRK committed rABC9f9dcac4297f: net: Add -networkactive option (authored by Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>).Jul 1 2021, 06:25