diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-09 10:07:47 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2020-07-22 22:55:11 +0300 |
commit | 62fe6aa87e4cdd8b06207abc1387c68d7bfc04c1 (patch) | |
tree | 93b7d18a4ca1be760b3ba50eaaa727883d2b99c8 /src/net.cpp | |
parent | f7c19e829eca10ce8b4acafc61264f8bb9b922f3 (diff) | |
download | bitcoin-62fe6aa87e4cdd8b06207abc1387c68d7bfc04c1.tar.xz |
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.
Diffstat (limited to 'src/net.cpp')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index 21d340b516..aa0486f0fb 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -2262,12 +2262,14 @@ void CConnman::SetNetworkActive(bool active) uiInterface.NotifyNetworkActiveChanged(fNetworkActive); } -CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In) : nSeed0(nSeed0In), nSeed1(nSeed1In) +CConnman::CConnman(uint64_t nSeed0In, uint64_t nSeed1In, bool network_active) + : nSeed0(nSeed0In), nSeed1(nSeed1In) { SetTryNewOutboundPeer(false); Options connOptions; Init(connOptions); + SetNetworkActive(network_active); } NodeId CConnman::GetNewNodeId() |