interfaces: remove now unused 'use_upnp' arg from 'mapPort'

pull/31130/head
Antoine Poinsot 3 weeks ago
parent 038bbe7b20
commit a5fcfb7385
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

@ -1827,7 +1827,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
if (node.peerman) node.peerman->SetBestBlock(chain_active_height, std::chrono::seconds{best_block_time});
// Map ports with NAT-PMP
StartMapPort(false, args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
StartMapPort(args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
CConnman::Options connOptions;
connOptions.m_local_services = g_local_services;

@ -121,7 +121,7 @@ public:
virtual void resetSettings() = 0;
//! Map port.
virtual void mapPort(bool use_upnp, bool use_pcp) = 0;
virtual void mapPort(bool use_pcp) = 0;
//! Get proxy.
virtual bool getProxy(Network net, Proxy& proxy_info) = 0;

@ -190,7 +190,7 @@ static void MapPortProtoSetEnabled(MapPortProtoFlag proto, bool enabled)
}
}
void StartMapPort(bool use_upnp, bool use_pcp)
void StartMapPort(bool use_pcp)
{
MapPortProtoSetEnabled(MapPortProtoFlag::PCP, use_pcp);
DispatchMapPort();

@ -13,7 +13,7 @@ enum MapPortProtoFlag : unsigned int {
PCP = 0x02, // PCP with NAT-PMP fallback.
};
void StartMapPort(bool use_upnp, bool use_pcp);
void StartMapPort(bool use_pcp);
void InterruptMapPort();
void StopMapPort();

@ -187,7 +187,7 @@ public:
});
args().WriteSettingsFile();
}
void mapPort(bool use_upnp, bool use_pcp) override { StartMapPort(use_upnp, use_pcp); }
void mapPort(bool use_pcp) override { StartMapPort(use_pcp); }
bool getProxy(Network net, Proxy& proxy_info) override { return GetProxy(net, proxy_info); }
size_t getNodeCount(ConnectionDirection flags) override
{

@ -526,7 +526,7 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
case MapPortNatpmp: // core option - can be changed on-the-fly
if (changed()) {
update(value.toBool());
node().mapPort(false, value.toBool());
node().mapPort(value.toBool());
}
break;
case MinimizeOnClose:

Loading…
Cancel
Save