mirror of
https://github.com/monero-project/monero.git
synced 2025-12-22 23:26:44 -08:00
wallet2_api: allow connection to return "yes, but wrong version"
This commit is contained in:
@@ -720,9 +720,15 @@ bool WalletImpl::connectToDaemon()
|
||||
return result;
|
||||
}
|
||||
|
||||
bool WalletImpl::connected() const
|
||||
Wallet::ConnectionStatus WalletImpl::connected() const
|
||||
{
|
||||
return m_wallet->check_connection();
|
||||
bool same_version = false;
|
||||
bool is_connected = m_wallet->check_connection(&same_version);
|
||||
if (!is_connected)
|
||||
return Wallet::ConnectionStatus_Disconnected;
|
||||
if (!same_version)
|
||||
return Wallet::ConnectionStatus_WrongVersion;
|
||||
return Wallet::ConnectionStatus_Connected;
|
||||
}
|
||||
|
||||
void WalletImpl::setTrustedDaemon(bool arg)
|
||||
|
||||
Reference in New Issue
Block a user