mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-24 18:23:26 -03:00
interfaces: remove now unused 'use_upnp' arg from 'mapPort'
This commit is contained in:
parent
038bbe7b20
commit
a5fcfb7385
6 changed files with 6 additions and 6 deletions
|
@ -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});
|
if (node.peerman) node.peerman->SetBestBlock(chain_active_height, std::chrono::seconds{best_block_time});
|
||||||
|
|
||||||
// Map ports with NAT-PMP
|
// Map ports with NAT-PMP
|
||||||
StartMapPort(false, args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
|
StartMapPort(args.GetBoolArg("-natpmp", DEFAULT_NATPMP));
|
||||||
|
|
||||||
CConnman::Options connOptions;
|
CConnman::Options connOptions;
|
||||||
connOptions.m_local_services = g_local_services;
|
connOptions.m_local_services = g_local_services;
|
||||||
|
|
|
@ -121,7 +121,7 @@ public:
|
||||||
virtual void resetSettings() = 0;
|
virtual void resetSettings() = 0;
|
||||||
|
|
||||||
//! Map port.
|
//! Map port.
|
||||||
virtual void mapPort(bool use_upnp, bool use_pcp) = 0;
|
virtual void mapPort(bool use_pcp) = 0;
|
||||||
|
|
||||||
//! Get proxy.
|
//! Get proxy.
|
||||||
virtual bool getProxy(Network net, Proxy& proxy_info) = 0;
|
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);
|
MapPortProtoSetEnabled(MapPortProtoFlag::PCP, use_pcp);
|
||||||
DispatchMapPort();
|
DispatchMapPort();
|
||||||
|
|
|
@ -13,7 +13,7 @@ enum MapPortProtoFlag : unsigned int {
|
||||||
PCP = 0x02, // PCP with NAT-PMP fallback.
|
PCP = 0x02, // PCP with NAT-PMP fallback.
|
||||||
};
|
};
|
||||||
|
|
||||||
void StartMapPort(bool use_upnp, bool use_pcp);
|
void StartMapPort(bool use_pcp);
|
||||||
void InterruptMapPort();
|
void InterruptMapPort();
|
||||||
void StopMapPort();
|
void StopMapPort();
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ public:
|
||||||
});
|
});
|
||||||
args().WriteSettingsFile();
|
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); }
|
bool getProxy(Network net, Proxy& proxy_info) override { return GetProxy(net, proxy_info); }
|
||||||
size_t getNodeCount(ConnectionDirection flags) override
|
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
|
case MapPortNatpmp: // core option - can be changed on-the-fly
|
||||||
if (changed()) {
|
if (changed()) {
|
||||||
update(value.toBool());
|
update(value.toBool());
|
||||||
node().mapPort(false, value.toBool());
|
node().mapPort(value.toBool());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MinimizeOnClose:
|
case MinimizeOnClose:
|
||||||
|
|
Loading…
Add table
Reference in a new issue