daemon: async daemon status check, don't freeze on wallet startup

This commit is contained in:
xiphon
2019-08-13 12:21:47 +00:00
parent 55b4425c5d
commit a01ffc6e1a
3 changed files with 17 additions and 4 deletions

View File

@@ -243,6 +243,14 @@ bool DaemonManager::running(NetworkType::Type nettype) const
}
return false;
}
void DaemonManager::runningAsync(NetworkType::Type nettype, const QJSValue& callback) const
{
m_scheduler.run([this, nettype] {
return QJSValueList({running(nettype)});
}, callback);
}
bool DaemonManager::sendCommand(const QString &cmd, NetworkType::Type nettype) const
{
QString message;