Page MenuHomePhabricator

D8020.diff
No OneTemporary

D8020.diff

diff --git a/src/interfaces/node.h b/src/interfaces/node.h
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -131,10 +131,10 @@
virtual bool unban(const CSubNet &ip) = 0;
//! Disconnect node by address.
- virtual bool disconnect(const CNetAddr &net_addr) = 0;
+ virtual bool disconnectByAddress(const CNetAddr &net_addr) = 0;
//! Disconnect node by id.
- virtual bool disconnect(NodeId id) = 0;
+ virtual bool disconnectById(NodeId id) = 0;
//! Get total bytes recv.
virtual int64_t getTotalBytesRecv() = 0;
diff --git a/src/interfaces/node.cpp b/src/interfaces/node.cpp
--- a/src/interfaces/node.cpp
+++ b/src/interfaces/node.cpp
@@ -184,13 +184,13 @@
}
return false;
}
- bool disconnect(const CNetAddr &net_addr) override {
+ bool disconnectByAddress(const CNetAddr &net_addr) override {
if (m_context->connman) {
return m_context->connman->DisconnectNode(net_addr);
}
return false;
}
- bool disconnect(NodeId id) override {
+ bool disconnectById(NodeId id) override {
if (m_context->connman) {
return m_context->connman->DisconnectNode(id);
}
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1384,7 +1384,7 @@
// Get currently selected peer address
NodeId id = nodes.at(i).data().toLongLong();
// Find the node, disconnect it and clear the selected node
- if (m_node.disconnect(id)) {
+ if (m_node.disconnectById(id)) {
clearSelectedNode();
}
}
@@ -1414,7 +1414,7 @@
clientModel->getPeerTableModel()->getNodeStats(detailNodeRow);
if (stats) {
m_node.ban(stats->nodeStats.addr, bantime);
- m_node.disconnect(stats->nodeStats.addr);
+ m_node.disconnectByAddress(stats->nodeStats.addr);
}
}
clearSelectedNode();

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 11:06 (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187498
Default Alt Text
D8020.diff (2 KB)

Event Timeline