Merge pull request #4378

ac934663 rpc: add a "is an update available" flag in get_info (moneromooo-monero)
This commit is contained in:
Riccardo Spagni
2018-09-21 20:41:53 +02:00
4 changed files with 23 additions and 2 deletions
+12
View File
@@ -738,6 +738,16 @@ namespace cryptonote
*/
network_type get_nettype() const { return m_nettype; };
/**
* @brief check whether an update is known to be available or not
*
* This does not actually trigger a check, but returns the result
* of the last check
*
* @return whether an update is known to be available or not
*/
bool is_update_available() const { return m_update_available; }
/**
* @brief get whether fluffy blocks are enabled
*
@@ -966,6 +976,8 @@ namespace cryptonote
network_type m_nettype; //!< which network are we on?
std::atomic<bool> m_update_available;
std::string m_checkpoints_path; //!< path to json checkpoints file
time_t m_last_dns_checkpoints_update; //!< time when dns checkpoints were last updated
time_t m_last_json_checkpoints_update; //!< time when json checkpoints were last updated