Remove direct bitcoin calls from qt/clientmodel.cpp
This commit is contained in:
committed by
John Newbery
parent
5fba3af21e
commit
fe6f27e6ea
@@ -2,6 +2,7 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#include <interface/node.h>
|
||||
#include <qt/trafficgraphwidget.h>
|
||||
#include <qt/clientmodel.h>
|
||||
|
||||
@@ -35,8 +36,8 @@ void TrafficGraphWidget::setClientModel(ClientModel *model)
|
||||
{
|
||||
clientModel = model;
|
||||
if(model) {
|
||||
nLastBytesIn = model->getTotalBytesRecv();
|
||||
nLastBytesOut = model->getTotalBytesSent();
|
||||
nLastBytesIn = model->node().getTotalBytesRecv();
|
||||
nLastBytesOut = model->node().getTotalBytesSent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,8 +124,8 @@ void TrafficGraphWidget::updateRates()
|
||||
{
|
||||
if(!clientModel) return;
|
||||
|
||||
quint64 bytesIn = clientModel->getTotalBytesRecv(),
|
||||
bytesOut = clientModel->getTotalBytesSent();
|
||||
quint64 bytesIn = clientModel->node().getTotalBytesRecv(),
|
||||
bytesOut = clientModel->node().getTotalBytesSent();
|
||||
float inRate = (bytesIn - nLastBytesIn) / 1024.0f * 1000 / timer->interval();
|
||||
float outRate = (bytesOut - nLastBytesOut) / 1024.0f * 1000 / timer->interval();
|
||||
vSamplesIn.push_front(inRate);
|
||||
@@ -169,8 +170,8 @@ void TrafficGraphWidget::clear()
|
||||
fMax = 0.0f;
|
||||
|
||||
if(clientModel) {
|
||||
nLastBytesIn = clientModel->getTotalBytesRecv();
|
||||
nLastBytesOut = clientModel->getTotalBytesSent();
|
||||
nLastBytesIn = clientModel->node().getTotalBytesRecv();
|
||||
nLastBytesOut = clientModel->node().getTotalBytesSent();
|
||||
}
|
||||
timer->start();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user