Browse Source

Fixes for timer to not constantly poll z_getoperationstatus

pull/112/head
fekt 2 years ago
parent
commit
26a9788f7f
  1. 7
      src/rpc.cpp
  2. 1
      src/sendtab.cpp

7
src/rpc.cpp

@ -52,14 +52,13 @@ RPC::RPC(MainWindow* main) {
});
timer->start(Settings::updateSpeed);
// Set up the timer to watch for tx status
txTimer = new QTimer(main);
QObject::connect(txTimer, &QTimer::timeout, [=]() {
//qDebug() << "Watching tx status";
watchTxStatus();
});
txTimer->start(Settings::updateSpeed);
qDebug() << __func__ << "Done settings up all timers";
usedAddresses = new QMap<QString, bool>();
@ -1180,8 +1179,10 @@ void RPC::watchTxStatus() {
}
if (watchingOps.isEmpty()) {
txTimer->start(Settings::updateSpeed);
// Stop the timer
txTimer->stop();
} else {
// Keep polling for updates
txTimer->start(Settings::quickUpdateSpeed);
}
}

1
src/sendtab.cpp

@ -737,6 +737,7 @@ void MainWindow::sendButton() {
// And switch to the balances tab
ui->tabWidget->setCurrentIndex(0);
});
// Force a UI update so we get the unconfirmed Tx
rpc->refresh(true);
},

Loading…
Cancel
Save