@@ -41,7 +41,6 @@ static const char* SettingName(OptionsModel::OptionID option)
41
41
case OptionsModel::ThreadsScriptVerif: return " par" ;
42
42
case OptionsModel::SpendZeroConfChange: return " spendzeroconfchange" ;
43
43
case OptionsModel::ExternalSignerPath: return " signer" ;
44
- case OptionsModel::MapPortUPnP: return " upnp" ;
45
44
case OptionsModel::MapPortNatpmp: return " natpmp" ;
46
45
case OptionsModel::Listen: return " listen" ;
47
46
case OptionsModel::Server: return " server" ;
@@ -215,7 +214,7 @@ bool OptionsModel::Init(bilingual_str& error)
215
214
216
215
// These are shared with the core or have a command-line parameter
217
216
// and we want command-line parameters to overwrite the GUI settings.
218
- for (OptionID option : {DatabaseCache, ThreadsScriptVerif, SpendZeroConfChange, ExternalSignerPath, MapPortUPnP,
217
+ for (OptionID option : {DatabaseCache, ThreadsScriptVerif, SpendZeroConfChange, ExternalSignerPath,
219
218
MapPortNatpmp, Listen, Server, Prune, ProxyUse, ProxyUseTor, Language}) {
220
219
std::string setting = SettingName (option);
221
220
if (node ().isSettingIgnored (setting)) addOverriddenOption (" -" + setting);
@@ -412,12 +411,6 @@ QVariant OptionsModel::getOption(OptionID option, const std::string& suffix) con
412
411
return m_show_tray_icon;
413
412
case MinimizeToTray:
414
413
return fMinimizeToTray ;
415
- case MapPortUPnP:
416
- #ifdef USE_UPNP
417
- return SettingToBool (setting (), DEFAULT_UPNP);
418
- #else
419
- return false ;
420
- #endif // USE_UPNP
421
414
case MapPortNatpmp:
422
415
return SettingToBool (setting (), DEFAULT_NATPMP);
423
416
case MinimizeOnClose:
@@ -530,16 +523,10 @@ bool OptionsModel::setOption(OptionID option, const QVariant& value, const std::
530
523
fMinimizeToTray = value.toBool ();
531
524
settings.setValue (" fMinimizeToTray" , fMinimizeToTray );
532
525
break ;
533
- case MapPortUPnP: // core option - can be changed on-the-fly
534
- if (changed ()) {
535
- update (value.toBool ());
536
- node ().mapPort (value.toBool (), getOption (MapPortNatpmp).toBool ());
537
- }
538
- break ;
539
526
case MapPortNatpmp: // core option - can be changed on-the-fly
540
527
if (changed ()) {
541
528
update (value.toBool ());
542
- node ().mapPort (getOption (MapPortUPnP). toBool () , value.toBool ());
529
+ node ().mapPort (false , value.toBool ());
543
530
}
544
531
break ;
545
532
case MinimizeOnClose:
@@ -789,7 +776,6 @@ void OptionsModel::checkAndMigrate()
789
776
migrate_setting (SpendZeroConfChange, " bSpendZeroConfChange" );
790
777
migrate_setting (ExternalSignerPath, " external_signer_path" );
791
778
#endif
792
- migrate_setting (MapPortUPnP, " fUseUPnP" );
793
779
migrate_setting (MapPortNatpmp, " fUseNatpmp" );
794
780
migrate_setting (Listen, " fListen" );
795
781
migrate_setting (Server, " server" );
@@ -803,7 +789,7 @@ void OptionsModel::checkAndMigrate()
803
789
804
790
// In case migrating QSettings caused any settings value to change, rerun
805
791
// parameter interaction code to update other settings. This is particularly
806
- // important for the -listen setting, which should cause -listenonion, -upnp,
792
+ // important for the -listen setting, which should cause -listenonion
807
793
// and other settings to default to false if it was set to false.
808
794
// (https://github.com/bitcoin-core/gui/issues/567).
809
795
node ().initParameterInteraction ();
0 commit comments