Changeset View
Changeset View
Standalone View
Standalone View
src/qt/rpcconsole.cpp
Show First 20 Lines • Show All 1,301 Lines • ▼ Show 20 Lines | void RPCConsole::updateNodeDetail(const CNodeCombinedStats *stats) { | ||||
ui->peerHeight->setText( | ui->peerHeight->setText( | ||||
QString("%1").arg(QString::number(stats->nodeStats.nStartingHeight))); | QString("%1").arg(QString::number(stats->nodeStats.nStartingHeight))); | ||||
ui->peerWhitelisted->setText( | ui->peerWhitelisted->setText( | ||||
stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No")); | stats->nodeStats.m_legacyWhitelisted ? tr("Yes") : tr("No")); | ||||
// This check fails for example if the lock was busy and | // This check fails for example if the lock was busy and | ||||
// nodeStateStats couldn't be fetched. | // nodeStateStats couldn't be fetched. | ||||
if (stats->fNodeStateStatsAvailable) { | if (stats->fNodeStateStatsAvailable) { | ||||
// Ban score is init to 0 | |||||
ui->peerBanScore->setText( | |||||
QString("%1").arg(stats->nodeStateStats.nMisbehavior)); | |||||
// Sync height is init to -1 | // Sync height is init to -1 | ||||
if (stats->nodeStateStats.nSyncHeight > -1) { | if (stats->nodeStateStats.nSyncHeight > -1) { | ||||
ui->peerSyncHeight->setText( | ui->peerSyncHeight->setText( | ||||
QString("%1").arg(stats->nodeStateStats.nSyncHeight)); | QString("%1").arg(stats->nodeStateStats.nSyncHeight)); | ||||
} else { | } else { | ||||
ui->peerSyncHeight->setText(tr("Unknown")); | ui->peerSyncHeight->setText(tr("Unknown")); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines |