Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
752// Migrate and delete legacy GUI settings that have now moved to <datadir>/settings.json.753auto migrate_setting = [&](OptionID option, const QString& qt_name) {754if (!settings.contains(qt_name)) return;755QVariant value = settings.value(qt_name);756if (node().getPersistentSetting(SettingName(option)).isNull()) {757if (option == ProxyIP) {758ProxySetting parsed = ParseProxyString(value.toString());759setOption(ProxyIP, parsed.ip);760setOption(ProxyPort, parsed.port);761} else if (option == ProxyIPTor) {762ProxySetting parsed = ParseProxyString(value.toString());763setOption(ProxyIPTor, parsed.ip);764setOption(ProxyPortTor, parsed.port);765} else {766setOption(option, value);767}768}769settings.remove(qt_name);770};772migrate_setting(DatabaseCache, "nDatabaseCache");773migrate_setting(ThreadsScriptVerif, "nThreadsScriptVerif");774#ifdef ENABLE_WALLET775migrate_setting(SpendZeroConfChange, "bSpendZeroConfChange");776migrate_setting(ExternalSignerPath, "external_signer_path");777#endif778migrate_setting(MapPortNatpmp, "fUseNatpmp");779migrate_setting(Listen, "fListen");780migrate_setting(Server, "server");781migrate_setting(PruneSize, "nPruneSize");782migrate_setting(Prune, "bPrune");783migrate_setting(ProxyIP, "addrProxy");784migrate_setting(ProxyUse, "fUseProxy");785migrate_setting(ProxyIPTor, "addrSeparateProxyTor");786migrate_setting(ProxyUseTor, "fUseSeparateProxyTor");787migrate_setting(Language, "language");789// In case migrating QSettings caused any settings value to change, rerun790// parameter interaction code to update other settings. This is particularly791// important for the -listen setting, which should cause -listenonion792// and other settings to default to false if it was set to false.793// (https://github.com/bitcoin-core/gui/issues/567).794node().initParameterInteraction();795}
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.