diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-26 12:53:33 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-11-26 12:56:44 +0000 |
commit | d6086f5b4ee7b35c006c46d8d69c4fcacabf37e7 (patch) | |
tree | 34a0766edc040231ea6ac90fadab8f937e63cd72 /src/wallet/api/wallet.cpp | |
parent | Merge pull request #1372 (diff) | |
download | monero-d6086f5b4ee7b35c006c46d8d69c4fcacabf37e7.tar.xz |
Improve daemon RPC version handling
Daemon RPC version is now composed of a major and minor number,
so that incompatible changes bump the major version, while
compatible changes can still bump the minor version without
causing clients to unnecessarily complain.
Diffstat (limited to '')
-rw-r--r-- | src/wallet/api/wallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp index 215b61aef..8514abfcd 100644 --- a/src/wallet/api/wallet.cpp +++ b/src/wallet/api/wallet.cpp @@ -906,11 +906,11 @@ bool WalletImpl::connectToDaemon() Wallet::ConnectionStatus WalletImpl::connected() const { - bool same_version = false; - bool is_connected = m_wallet->check_connection(&same_version); + uint32_t version = 0; + bool is_connected = m_wallet->check_connection(&version); if (!is_connected) return Wallet::ConnectionStatus_Disconnected; - if (!same_version) + if ((version >> 16) != CORE_RPC_VERSION_MAJOR) return Wallet::ConnectionStatus_WrongVersion; return Wallet::ConnectionStatus_Connected; } |