aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-04-17 15:37:36 -0400
committerJohn Newbery <john@johnnewbery.com>2018-04-04 16:52:40 -0400
commitfe6f27e6ea68a139d3a98b30a53706008ef8b132 (patch)
treeb464ec4ceb05146ccd8c2f4e7f44559546a6e72c /src/qt/rpcconsole.cpp
parent5fba3af21e44ab7552c57782de430c1f4cfd6697 (diff)
downloadbitcoin-fe6f27e6ea68a139d3a98b30a53706008ef8b132.tar.xz
Remove direct bitcoin calls from qt/clientmodel.cpp
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index c41e19f6f5..d6cd9ef8ef 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -14,6 +14,7 @@
#include <qt/platformstyle.h>
#include <qt/walletmodel.h>
#include <chainparams.h>
+#include <interface/node.h>
#include <netbase.h>
#include <rpc/server.h>
#include <rpc/client.h>
@@ -566,13 +567,14 @@ void RPCConsole::setClientModel(ClientModel *model)
setNumConnections(model->getNumConnections());
connect(model, SIGNAL(numConnectionsChanged(int)), this, SLOT(setNumConnections(int)));
- setNumBlocks(model->getNumBlocks(), model->getLastBlockDate(), model->getVerificationProgress(nullptr), false);
+ interface::Node& node = clientModel->node();
+ setNumBlocks(node.getNumBlocks(), QDateTime::fromTime_t(node.getLastBlockTime()), node.getVerificationProgress(), false);
connect(model, SIGNAL(numBlocksChanged(int,QDateTime,double,bool)), this, SLOT(setNumBlocks(int,QDateTime,double,bool)));
updateNetworkState();
connect(model, SIGNAL(networkActiveChanged(bool)), this, SLOT(setNetworkActive(bool)));
- updateTrafficStats(model->getTotalBytesRecv(), model->getTotalBytesSent());
+ updateTrafficStats(node.getTotalBytesRecv(), node.getTotalBytesSent());
connect(model, SIGNAL(bytesChanged(quint64,quint64)), this, SLOT(updateTrafficStats(quint64, quint64)));
connect(model, SIGNAL(mempoolSizeChanged(long,size_t)), this, SLOT(setMempoolSize(long,size_t)));
@@ -835,7 +837,7 @@ void RPCConsole::updateNetworkState()
connections += tr("In:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_IN)) + " / ";
connections += tr("Out:") + " " + QString::number(clientModel->getNumConnections(CONNECTIONS_OUT)) + ")";
- if(!clientModel->getNetworkActive()) {
+ if(!clientModel->node().getNetworkActive()) {
connections += " (" + tr("Network activity disabled") + ")";
}