Skip to content

Commit

Permalink
Display number of masternodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Spread committed Feb 4, 2015
1 parent 1647247 commit fcdf8d1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/qt/forms/masternodepage.ui
Expand Up @@ -17,7 +17,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label_2">
<widget class="QLabel" name="labelMasternodes">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand Down
8 changes: 8 additions & 0 deletions src/qt/masternodepage.cpp
Expand Up @@ -215,6 +215,14 @@ void MasternodePage::updateMasternodes()
pTable->setCellWidget(iRow, (int)C_CONTROL, pWidget);
}
}

int n = 0;
for (const CMasterNode* pmn : masternodes)
{
n += pmn->elected;
}

ui->labelMasternodes->setText(tr("Masternodes (%1):").arg(n));
}

void MasternodePage::switchMasternode(const CKeyID &keyid, const COutPoint &outpoint, bool state)
Expand Down

0 comments on commit fcdf8d1

Please sign in to comment.