aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorCory Fields <cory-nospam-@coryfields.com>2017-04-10 15:00:23 -0400
committerCory Fields <cory-nospam-@coryfields.com>2017-04-12 13:42:02 -0400
commitc851be4b25905977ca471c42435dc590fd2ff2f5 (patch)
tree092bcb15e4915288873978b6de18e83dfe01887d /src/qt
parent471ed00fcd3b6feb2e37ad071c7ead78b4e2dad7 (diff)
downloadbitcoin-c851be4b25905977ca471c42435dc590fd2ff2f5.tar.xz
net: define NodeId as an int64_t
This should make occurances of NodeId wrapping essentially impossible for real-world usage.
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/peertablemodel.cpp2
-rw-r--r--src/qt/rpcconsole.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/qt/peertablemodel.cpp b/src/qt/peertablemodel.cpp
index 974a71ddca..fff072fd4c 100644
--- a/src/qt/peertablemodel.cpp
+++ b/src/qt/peertablemodel.cpp
@@ -166,7 +166,7 @@ QVariant PeerTableModel::data(const QModelIndex &index, int role) const
switch(index.column())
{
case NetNodeId:
- return rec->nodeStats.nodeid;
+ return (qint64)rec->nodeStats.nodeid;
case Address:
return QString::fromStdString(rec->nodeStats.addrName);
case Subversion:
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 5167232d6a..bb8aa23de8 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1118,7 +1118,7 @@ void RPCConsole::disconnectSelectedNode()
for(int i = 0; i < nodes.count(); i++)
{
// Get currently selected peer address
- NodeId id = nodes.at(i).data().toInt();
+ NodeId id = nodes.at(i).data().toLongLong();
// Find the node, disconnect it and clear the selected node
if(g_connman->DisconnectNode(id))
clearSelectedNode();
@@ -1135,7 +1135,7 @@ void RPCConsole::banSelectedNode(int bantime)
for(int i = 0; i < nodes.count(); i++)
{
// Get currently selected peer address
- NodeId id = nodes.at(i).data().toInt();
+ NodeId id = nodes.at(i).data().toLongLong();
// Get currently selected peer address
int detailNodeRow = clientModel->getPeerTableModel()->getRowByNodeId(id);