Merge e569eb8d91 into merged_master (Bitcoin PR bitcoin/bitcoin#30885)

This commit is contained in:
ivanlele 2026-03-30 10:23:13 +00:00
commit c87d15b35c
No known key found for this signature in database
3 changed files with 13 additions and 13 deletions

View file

@ -877,7 +877,7 @@ namespace { // Variables internal to initialization process only
int nMaxConnections;
int available_fds;
ServiceFlags nLocalServices = ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS);
ServiceFlags g_local_services = ServiceFlags(NODE_NETWORK_LIMITED | NODE_WITNESS);
int64_t peer_connect_timeout;
std::set<BlockFilterType> g_enabled_filter_types;
@ -982,7 +982,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
// Signal NODE_P2P_V2 if BIP324 v2 transport is enabled.
if (args.GetBoolArg("-v2transport", DEFAULT_V2_TRANSPORT)) {
nLocalServices = ServiceFlags(nLocalServices | NODE_P2P_V2);
g_local_services = ServiceFlags(g_local_services | NODE_P2P_V2);
}
// Signal NODE_COMPACT_FILTERS if peerblockfilters and basic filters index are both enabled.
@ -991,7 +991,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
return InitError(_("Cannot set -peerblockfilters without -blockfilterindex."));
}
nLocalServices = ServiceFlags(nLocalServices | NODE_COMPACT_FILTERS);
g_local_services = ServiceFlags(g_local_services | NODE_COMPACT_FILTERS);
}
if (args.GetIntArg("-prune", 0)) {
@ -1097,7 +1097,7 @@ bool AppInitParameterInteraction(const ArgsManager& args)
SetMockTime(args.GetIntArg("-mocktime", 0)); // SetMockTime(0) is a no-op
if (args.GetBoolArg("-peerbloomfilters", DEFAULT_PEERBLOOMFILTERS))
nLocalServices = ServiceFlags(nLocalServices | NODE_BLOOM);
g_local_services = ServiceFlags(g_local_services | NODE_BLOOM);
// ELEMENTS
try {
@ -1872,7 +1872,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
// Prior to setting NODE_NETWORK, check if we can provide historical blocks.
if (!WITH_LOCK(chainman.GetMutex(), return chainman.BackgroundSyncInProgress())) {
LogPrintf("Setting NODE_NETWORK on non-prune mode\n");
nLocalServices = ServiceFlags(nLocalServices | NODE_NETWORK);
g_local_services = ServiceFlags(g_local_services | NODE_NETWORK);
} else {
LogPrintf("Running node in NODE_NETWORK_LIMITED mode until snapshot background sync completes\n");
}
@ -1992,7 +1992,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
StartMapPort(args.GetBoolArg("-upnp", DEFAULT_UPNP), args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
CConnman::Options connOptions;
connOptions.nLocalServices = nLocalServices;
connOptions.m_local_services = g_local_services;
connOptions.m_max_automatic_connections = nMaxConnections;
connOptions.uiInterface = &uiInterface;
connOptions.m_banman = node.banman.get();