mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
Allow -upnp to override setting in wallet (and simplify logic a bit)
This commit is contained in:
committed by
Luke Dashjr
parent
e5b031f5d2
commit
1b6d8f3fca
15
src/init.cpp
15
src/init.cpp
@@ -516,16 +516,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user