mirror of
https://github.com/monero-project/monero.git
synced 2025-11-29 23:06:34 -05:00
Merge pull request #1302
63fe6fd wallet2_api: allow connection to return "yes, but wrong version" (moneromooo-monero)
This commit is contained in:
commit
7c7a6cf2f8
3 changed files with 16 additions and 4 deletions
|
|
@ -760,9 +760,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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue