Browse Source

Add chain txcount to hushd tab

deadstrip
Duke Leto 4 years ago
parent
commit
573855e5d1
  1. 21
      src/mainwindow.ui
  2. 9
      src/rpc.cpp

21
src/mainwindow.ui

@ -1376,6 +1376,27 @@
</widget>
</item>
<item row="20" column="0">
<widget class="QLabel" name="chaintxcountlabel">
<property name="text">
<string>Chain Transactions</string>
</property>
</widget>
</item>
<item row="20" column="2">
<widget class="QLabel" name="chaintxcount">
<property name="text">
<string>Loading...</string>
</property>
</widget>
</item>
<item row="20" column="1">
<widget class="QLabel" name="chaintxcountspacer">
<property name="text">
<string>|</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="solrate">

9
src/rpc.cpp

@ -633,12 +633,17 @@ void RPC::getInfoThenRefresh(bool force) {
});
std::string method2 = "getwalletinfo";
conn->doRPCIgnoreError(makePayload(method2), [=](const json& reply) {
conn->doRPCIgnoreError(makePayload("getwalletinfo"), [=](const json& reply) {
int txcount = reply["txcount"].get<json::number_integer_t>();
ui->txcount->setText(QString::number(txcount));
});
//TODO: If -zindex is enabled, show stats
conn->doRPCIgnoreError(makePayload("getchaintxstats"), [=](const json& reply) {
int txcount = reply["txcount"].get<json::number_integer_t>();
ui->chaintxcount->setText(QString::number(txcount));
});
// Call to see if the blockchain is syncing.
payload = {
{"jsonrpc", "1.0"},

Loading…
Cancel
Save