diff --git a/src/mainwindow.ui b/src/mainwindow.ui
index 490fe66..26f71ad 100644
--- a/src/mainwindow.ui
+++ b/src/mainwindow.ui
@@ -936,6 +936,7 @@
+
-
@@ -957,6 +958,52 @@
+
+ -
+
+
+ Notarized txid
+
+
+
+ -
+
+
+ Loading...
+
+
+
+ -
+
+
+ |
+
+
+
+
+ -
+
+
+ Notarized Lag
+
+
+
+ -
+
+
+ Loading...
+
+
+
+ -
+
+
+ |
+
+
+
+
+
-
diff --git a/src/rpc.cpp b/src/rpc.cpp
index bdf59a2..56401b6 100644
--- a/src/rpc.cpp
+++ b/src/rpc.cpp
@@ -39,6 +39,7 @@ RPC::RPC(MainWindow* main) {
// Set up a timer to refresh the UI every few seconds
timer = new QTimer(main);
QObject::connect(timer, &QTimer::timeout, [=]() {
+ //qDebug() << "Refreshing main UI";
refresh();
});
timer->start(Settings::updateSpeed);
@@ -46,6 +47,7 @@ RPC::RPC(MainWindow* main) {
// Set up the timer to watch for tx status
txTimer = new QTimer(main);
QObject::connect(txTimer, &QTimer::timeout, [=]() {
+ //qDebug() << "Watching tx status";
watchTxStatus();
});
// Start at every 10s. When an operation is pending, this will change to every second
@@ -79,14 +81,14 @@ void RPC::setEZcashd(QProcess* p) {
}
}
-// Called when a connection to zcashd is available.
+// Called when a connection to hushd is available.
void RPC::setConnection(Connection* c) {
if (c == nullptr) return;
delete conn;
this->conn = c;
- ui->statusBar->showMessage("Ready!");
+ ui->statusBar->showMessage("Ready! Thank you for helping secure the Hush network by running a full node.");
// See if we need to remove the reindex/rescan flags from the zcash.conf file
auto zcashConfLocation = Settings::getInstance()->getZcashdConfLocation();
@@ -94,7 +96,7 @@ void RPC::setConnection(Connection* c) {
Settings::removeFromZcashConf(zcashConfLocation, "reindex");
// Refresh the UI
- refreshZECPrice();
+ refreshZECPrice();
checkForUpdate();
// Force update, because this might be coming from a settings update
@@ -527,6 +529,9 @@ void RPC::refresh(bool force) {
void RPC::getInfoThenRefresh(bool force) {
+
+ //qDebug() << "getinfo";
+
if (conn == nullptr)
return noConnection();
@@ -552,10 +557,14 @@ void RPC::getInfoThenRefresh(bool force) {
int curBlock = reply["blocks"].get();
int version = reply["version"].get();
int notarized = reply["notarized"].get();
+ int lag = curBlock - notarized;
QString ntzhash = QString::fromStdString( reply["notarizedhash"].get() );
+ QString ntztxid = QString::fromStdString( reply["notarizedtxid"].get() );
Settings::getInstance()->setZcashdVersion(version);
ui->notarizedhashvalue->setText( ntzhash );
+ ui->notarizedtxidvalue->setText( ntztxid );
+ ui->lagvalue->setText( QString::number(lag) );
if ( force || (curBlock != lastBlock) ) {
// Something changed, so refresh everything.
@@ -970,6 +979,8 @@ void RPC::watchTxStatus() {
}
void RPC::checkForUpdate(bool silent) {
+ qDebug() << "checking for updates";
+
if (conn == nullptr)
return noConnection();
@@ -977,7 +988,6 @@ void RPC::checkForUpdate(bool silent) {
QNetworkRequest req;
req.setUrl(cmcURL);
-
QNetworkReply *reply = conn->restclient->get(req);
QObject::connect(reply, &QNetworkReply::finished, [=] {