mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
net: move nLocalServices/nRelevantServices to CConnman
These are in-turn passed to CNode at connection time. This allows us to offer different services to different peers (or test the effects of doing so).
This commit is contained in:
parent
be9c796dc5
commit
bd72937dc4
7 changed files with 54 additions and 34 deletions
|
|
@ -982,6 +982,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
// Option to startup with mocktime set (used for regression testing):
|
||||
SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op
|
||||
|
||||
ServiceFlags nLocalServices = NODE_NETWORK;
|
||||
ServiceFlags nRelevantServices = NODE_NETWORK;
|
||||
|
||||
if (GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS))
|
||||
nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM);
|
||||
|
||||
|
|
@ -1506,7 +1509,7 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
|||
StartTorControl(threadGroup, scheduler);
|
||||
|
||||
std::string strNodeError;
|
||||
if(!StartNode(connman, threadGroup, scheduler, strNodeError))
|
||||
if(!StartNode(connman, threadGroup, scheduler, nLocalServices, nRelevantServices, strNodeError))
|
||||
return InitError(strNodeError);
|
||||
|
||||
// ********************************************************* Step 12: finished
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue