mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-04-01 03:39:06 +00:00
DaemonManager: use 'sync_info' to avoid bootstrap daemon requests
This commit is contained in:
parent
346e942e93
commit
bc22de47f9
1 changed files with 2 additions and 7 deletions
|
@ -234,14 +234,9 @@ void DaemonManager::printError()
|
||||||
bool DaemonManager::running(NetworkType::Type nettype) const
|
bool DaemonManager::running(NetworkType::Type nettype) const
|
||||||
{
|
{
|
||||||
QString status;
|
QString status;
|
||||||
sendCommand("status", nettype, status);
|
sendCommand("sync_info", nettype, status);
|
||||||
qDebug() << status;
|
qDebug() << status;
|
||||||
// `./monerod status` returns BUSY when syncing.
|
return status.contains("Height:");
|
||||||
// Treat busy as connected, until fixed upstream.
|
|
||||||
if (status.contains("Height:") || status.contains("BUSY") ) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DaemonManager::runningAsync(NetworkType::Type nettype, const QJSValue& callback) const
|
void DaemonManager::runningAsync(NetworkType::Type nettype, const QJSValue& callback) const
|
||||||
|
|
Loading…
Reference in a new issue