mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-19 13:27:35 +02: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:
parent
f7c19e829e
commit
62fe6aa87e
3 changed files with 6 additions and 3 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue