In f05d349 the value of the addrProxy
and addrSeparateProxyTor
settings is set to an illegal default value, because the value of DEFAULT_GUI_PROXY_PORT
is passed to the fieldWidth
parameter of the QString QString::arg(const QString &a, int fieldWidth = 0, QChar fillChar = QLatin1Char( ' ' )) const
method:
This will create a default proxy setting that consists of 9053 characters and ends with the string 127.0.0.1:%2
.
This PR attempts to resolve #12623 by setting the correct value for the addrProxy
and addrSeparateProxyTor
settings (i) if the proxy setting does not exist; or (ii) if the proxy setting has an illegal value caused by to the aforementioned bug.
The second condition is only relevant if we don’t want Bitcoin Core 0.16.0 users to explicitly reset their settings to see the correct default proxy port value.