diff options
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/optionsdialog.cpp | 3 | ||||
-rw-r--r-- | src/qt/optionsmodel.cpp | 1 | ||||
-rw-r--r-- | src/qt/rpcconsole.cpp | 9 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/qt/optionsdialog.cpp b/src/qt/optionsdialog.cpp index f2db398899..f73bb87064 100644 --- a/src/qt/optionsdialog.cpp +++ b/src/qt/optionsdialog.cpp @@ -327,7 +327,8 @@ QValidator::State ProxyAddressValidator::validate(QString &input, int &pos) cons { Q_UNUSED(pos); // Validate the proxy - proxyType addrProxy = proxyType(CService(input.toStdString(), 9050), true); + CService serv(LookupNumeric(input.toStdString().c_str(), 9050)); + proxyType addrProxy = proxyType(serv, true); if (addrProxy.IsValid()) return QValidator::Acceptable; diff --git a/src/qt/optionsmodel.cpp b/src/qt/optionsmodel.cpp index 684db71a8c..d33ab68277 100644 --- a/src/qt/optionsmodel.cpp +++ b/src/qt/optionsmodel.cpp @@ -15,6 +15,7 @@ #include "init.h" #include "main.h" // For DEFAULT_SCRIPTCHECK_THREADS #include "net.h" +#include "netbase.h" #include "txdb.h" // for -dbcache defaults #ifdef ENABLE_WALLET diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 650ff8b00d..bcaa9164c9 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -16,6 +16,7 @@ #include "bantablemodel.h" #include "chainparams.h" +#include "netbase.h" #include "rpc/server.h" #include "rpc/client.h" #include "util.h" @@ -898,7 +899,10 @@ void RPCConsole::banSelectedNode(int bantime) int port = 0; SplitHostPort(nStr, port, addr); - CNode::Ban(CNetAddr(addr), BanReasonManuallyAdded, bantime); + CNetAddr resolved; + if(!LookupHost(addr.c_str(), resolved, false)) + return; + CNode::Ban(resolved, BanReasonManuallyAdded, bantime); clearSelectedNode(); clientModel->getBanTableModel()->refresh(); @@ -912,8 +916,9 @@ void RPCConsole::unbanSelectedNode() // Get currently selected ban address QString strNode = GUIUtil::getEntryData(ui->banlistWidget, 0, BanTableModel::Address); - CSubNet possibleSubnet(strNode.toStdString()); + CSubNet possibleSubnet; + LookupSubNet(strNode.toStdString().c_str(), possibleSubnet); if (possibleSubnet.IsValid()) { CNode::Unban(possibleSubnet); |