add monero_version daemon model and wallet get_version() w/o impl

This commit is contained in:
woodser
2019-11-23 13:13:19 -05:00
parent d7ef45b0fa
commit ff0f0574a7
4 changed files with 29 additions and 0 deletions
+9
View File
@@ -84,6 +84,15 @@ namespace monero {
return monero_utils::serialize(to_property_tree());
}
// ----------------------------- MONERO VERSION -----------------------------
boost::property_tree::ptree monero_version::to_property_tree() const {
boost::property_tree::ptree node;
if (m_version_number != boost::none) node.put("versionNumber", *m_version_number);
if (m_is_release != boost::none) node.put("isRelease", *m_is_release);
return node;
}
// ------------------------- MONERO BLOCK HEADER ----------------------------
boost::property_tree::ptree monero_block_header::to_property_tree() const {
+9
View File
@@ -91,6 +91,15 @@ namespace monero {
STAGENET
};
/**
* Models a Monero version.
*/
struct monero_version : public serializable_struct {
boost::optional<uint32_t> m_version_number;
boost::optional<bool> m_is_release;
boost::property_tree::ptree to_property_tree() const;
};
/**
* Models a connection to a daemon.
*
+4
View File
@@ -981,6 +981,10 @@ namespace monero {
return m_is_synced;
}
monero_version monero_wallet::get_version() const {
throw runtime_error("Not implemented");
}
string monero_wallet::get_path() const {
return m_w2->path();
}
+7
View File
@@ -245,6 +245,13 @@ namespace monero {
*/
bool is_synced() const;
/**
* Get the wallet's version.
*
* @return the wallet's version
*/
monero_version get_version() const;
/**
* Get the path of this wallet's file on disk.
*