mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
mapport: rename 'use_pcp' to 'enable'
There is only a single protocol now, caller should just be concerned about whether to enable port mapping or not.
This commit is contained in:
parent
c4e82b854c
commit
2a6536ceda
4 changed files with 5 additions and 5 deletions
|
@ -121,7 +121,7 @@ public:
|
||||||
virtual void resetSettings() = 0;
|
virtual void resetSettings() = 0;
|
||||||
|
|
||||||
//! Map port.
|
//! Map port.
|
||||||
virtual void mapPort(bool use_pcp) = 0;
|
virtual void mapPort(bool enable) = 0;
|
||||||
|
|
||||||
//! Get proxy.
|
//! Get proxy.
|
||||||
virtual bool getProxy(Network net, Proxy& proxy_info) = 0;
|
virtual bool getProxy(Network net, Proxy& proxy_info) = 0;
|
||||||
|
|
|
@ -166,9 +166,9 @@ static void MapPortProtoSetEnabled(bool enabled)
|
||||||
g_mapport_enabled = enabled;
|
g_mapport_enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StartMapPort(bool use_pcp)
|
void StartMapPort(bool enable)
|
||||||
{
|
{
|
||||||
MapPortProtoSetEnabled(use_pcp);
|
MapPortProtoSetEnabled(enable);
|
||||||
DispatchMapPort();
|
DispatchMapPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
static constexpr bool DEFAULT_NATPMP = false;
|
static constexpr bool DEFAULT_NATPMP = false;
|
||||||
|
|
||||||
void StartMapPort(bool use_pcp);
|
void StartMapPort(bool enable);
|
||||||
void InterruptMapPort();
|
void InterruptMapPort();
|
||||||
void StopMapPort();
|
void StopMapPort();
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ public:
|
||||||
});
|
});
|
||||||
args().WriteSettingsFile();
|
args().WriteSettingsFile();
|
||||||
}
|
}
|
||||||
void mapPort(bool use_pcp) override { StartMapPort(use_pcp); }
|
void mapPort(bool enable) override { StartMapPort(enable); }
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue