Skip to content

Commit 3ca42ba

Browse files
fanquakePastaPastaPasta
authored andcommitted
Merge 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 bitcoin#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@92f88a9 hernanmarino: ACK 92f88a9 Tree-SHA512: 795dc8a8703bf322b5831d845de85f2428ee0dd45d3064b48ff47d147147381af26c0a9d00c596db12009b254763844b209989daf4e7470d20e8a1753b640966
1 parent ea32090 commit 3ca42ba

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
@@ -589,16 +589,12 @@ void SetupServerArgs(ArgsManager& argsman)
589589
argsman.AddArg("-torcontrol=<ip>:<port>", strprintf("Tor control port to use if onion listening enabled (default: %s)", DEFAULT_TOR_CONTROL), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
590590
argsman.AddArg("-torpassword=<pass>", "Tor control port password (default: empty)", ArgsManager::ALLOW_ANY | ArgsManager::SENSITIVE, OptionsCategory::CONNECTION);
591591
#ifdef USE_UPNP
592-
#if USE_UPNP
593-
argsman.AddArg("-upnp", "Use UPnP to map the listening port (default: 1 when listening and no -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
594-
#else
595-
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", 0), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
596-
#endif
592+
argsman.AddArg("-upnp", strprintf("Use UPnP to map the listening port (default: %u)", DEFAULT_UPNP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
597593
#else
598594
hidden_args.emplace_back("-upnp");
599595
#endif
600596
#ifdef USE_NATPMP
601-
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);
597+
argsman.AddArg("-natpmp", strprintf("Use NAT-PMP to map the listening port (default: %u)", DEFAULT_NATPMP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
602598
#else
603599
hidden_args.emplace_back("-natpmp");
604600
#endif // USE_NATPMP

0 commit comments

Comments
 (0)