mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-27 07:18:33 +02:00
p2p, refactor: return std::optional<CNetAddr> in LookupHost
This commit is contained in:
@@ -406,9 +406,8 @@ void OptionsDialog::updateProxyValidationState()
|
||||
|
||||
void OptionsDialog::updateDefaultProxyNets()
|
||||
{
|
||||
CNetAddr ui_proxy_netaddr;
|
||||
LookupHost(ui->proxyIp->text().toStdString(), ui_proxy_netaddr, /*fAllowLookup=*/false);
|
||||
const CService ui_proxy{ui_proxy_netaddr, ui->proxyPort->text().toUShort()};
|
||||
const std::optional<CNetAddr> ui_proxy_netaddr{LookupHost(ui->proxyIp->text().toStdString(), /*fAllowLookup=*/false)};
|
||||
const CService ui_proxy{ui_proxy_netaddr.value_or(CNetAddr{}), ui->proxyPort->text().toUShort()};
|
||||
|
||||
Proxy proxy;
|
||||
bool has_proxy;
|
||||
|
||||
Reference in New Issue
Block a user