mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
Allow -upnp to override setting in wallet (and simplify logic a bit)
This commit is contained in:
parent
177dbcaace
commit
8beb917c6c
1 changed files with 5 additions and 10 deletions
15
src/init.cpp
15
src/init.cpp
|
|
@ -487,16 +487,11 @@ bool AppInit2(int argc, char* argv[])
|
|||
fAllowDNS = GetBoolArg("-dns");
|
||||
fNoListen = GetBoolArg("-nolisten");
|
||||
|
||||
if (fHaveUPnP)
|
||||
{
|
||||
#if USE_UPNP
|
||||
if (GetBoolArg("-noupnp"))
|
||||
fUseUPnP = false;
|
||||
#else
|
||||
if (GetBoolArg("-upnp"))
|
||||
fUseUPnP = true;
|
||||
#endif
|
||||
}
|
||||
// Command-line args override in-wallet settings:
|
||||
if (mapArgs.count("-upnp"))
|
||||
fUseUPnP = GetBoolArg("-upnp");
|
||||
else if (mapArgs.count("-noupnp"))
|
||||
fUseUPnP = !GetBoolArg("-noupnp");
|
||||
|
||||
if (!fNoListen)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue