diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-11 14:43:57 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-11 14:44:24 +0200 |
commit | f15b72f482f0a63284d83e264f0aa60abcace35f (patch) | |
tree | 265d843b6053b877f95fcd32e2e3e1a645079a84 /src/util.cpp | |
parent | 7b6041d1a70cc160ab081adf666f77346420fbd7 (diff) | |
parent | 40c58866c7e7af3582cefb9b1810a20902e44167 (diff) |
Merge #12650: gui: Fix issue: "default port not shown correctly in settings dialog"
40c5886 Fix illegal default `addProxy` and `addrSeparateProxyTor` settings. (251)
Pull request description:
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:
https://github.com/bitcoin/bitcoin/blob/29fad97c320c892ab6a480c81e2078ec22ab354b/src/qt/optionsmodel.cpp#L129
https://github.com/bitcoin/bitcoin/blob/29fad97c320c892ab6a480c81e2078ec22ab354b/src/qt/optionsmodel.cpp#L139
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.
Tree-SHA512: 3dc3de2eb7da831f6e318797df67341ced2076b48f9b561c73677bf6beb67b259d8e413095f290356fb92e32e4e8162d48accbc575c4e612060fd5d6dde7ac8d
Diffstat (limited to 'src/util.cpp')
0 files changed, 0 insertions, 0 deletions