mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
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.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user