Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115440
D8020.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D8020.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:06 (14 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187498
Default Alt Text
D8020.diff (2 KB)
Attached To
D8020: refactor: Rename Node::disconnect methods
Event Timeline
Log In to Comment