diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2016-04-16 18:30:03 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2016-09-08 12:12:58 -0400 |
commit | c0569c7fa1e25599b3f1d6a16b15ec23052021da (patch) | |
tree | 608dc14407c8f28de2d6480910a13883dc47cefe /src/qt/rpcconsole.cpp | |
parent | 8ae2dac1c65349e4620422a43b7fa9d49af52c11 (diff) |
net: Add most functions needed for vNodes to CConnman
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r-- | src/qt/rpcconsole.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 708be6b646..f35f401d06 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -876,13 +876,13 @@ void RPCConsole::showBanTableContextMenu(const QPoint& point) void RPCConsole::disconnectSelectedNode() { + if(!g_connman) + return; // Get currently selected peer address - QString strNode = GUIUtil::getEntryData(ui->peerWidget, 0, PeerTableModel::Address).toString(); + NodeId id = GUIUtil::getEntryData(ui->peerWidget, 0, PeerTableModel::NetNodeId).toInt(); // Find the node, disconnect it and clear the selected node - if (CNode *bannedNode = FindNode(strNode.toStdString())) { - bannedNode->fDisconnect = true; + if(g_connman->DisconnectNode(id)) clearSelectedNode(); - } } void RPCConsole::banSelectedNode(int bantime) |