Skip to content

Commit 58446e1

Browse files
committed
Merge bitcoin/bitcoin#28874: doc: fixup help output for -upnp and -natpmp
92f88a9 doc: fixup NAT-PMP help doc (fanquake) 02395ed init: remove redundant upnp #ifdef (fanquake) Pull request description: This is a very belated followup to #26896 (which removed the configure options for setting the upnp and natpmp runtime default) and corrects the `-help` docs for `-upnp` and `-natpmp`. ACKs for top commit: davidgumberg: ACK bitcoin/bitcoin@92f88a9 hernanmarino: ACK 92f88a9 Tree-SHA512: 795dc8a8703bf322b5831d845de85f2428ee0dd45d3064b48ff47d147147381af26c0a9d00c596db12009b254763844b209989daf4e7470d20e8a1753b640966
2 parents 3abee5e + 92f88a9 commit 58446e1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/init.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,12 @@ void SetupServerArgs(ArgsManager& argsman)
553553
argsman.AddArg("-torcontrol=<ip>:<port>", strprintf("Tor control host and port to use if onion listening enabled (default: %s). If no port is specified, the default port of %i will be used.", DEFAULT_TOR_CONTROL, DEFAULT_TOR_CONTROL_PORT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
554554
argsman.AddArg("-torpassword=<pass>", "Tor control port password (default: empty)", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::CONNECTION);
555555
#ifdef USE_UPNP
556-
#if USE_UPNP
557-
argsman.AddArg("-upnp", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
558-
#else
559-
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", 0), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
560-
#endif
556+
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", DEFAULT_UPNP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
561557
#else
562558
hidden_args.emplace_back("-upnp");
563559
#endif
564560
#ifdef USE_NATPMP
565-
argsman.AddArg("-natpmp", strprintf("Use NAT-PMP to map the listening port (default: %s)", DEFAULT_NATPMP ? "1 when listening and no -proxy" : "0"), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
561+
argsman.AddArg("-natpmp", strprintf("Use NAT-PMP to map the listening port (default: %u)", DEFAULT_NATPMP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
566562
#else
567563
hidden_args.emplace_back("-natpmp");
568564
#endif // USE_NATPMP

0 commit comments

Comments
 (0)