aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-13 18:45:10 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-13 18:47:33 +0100
commit51b511be4c584ee4e5222bd3c4f4e08f36519082 (patch)
tree3d7371bd41a4a967a4a4b589b52e2bbd4e59d864 /src/simplewallet
parentdaemon: add a version command (diff)
downloadmonero-51b511be4c584ee4e5222bd3c4f4e08f36519082.tar.xz
simplewallet: add version command
Diffstat (limited to 'src/simplewallet')
-rw-r--r--src/simplewallet/simplewallet.cpp11
-rw-r--r--src/simplewallet/simplewallet.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 33615ffe2..f5a075f54 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -62,6 +62,7 @@
#include "ringct/rctSigs.h"
#include "multisig/multisig.h"
#include "wallet/wallet_args.h"
+#include "version.h"
#include <stdexcept>
#ifdef WIN32
@@ -1584,6 +1585,12 @@ bool simple_wallet::save_known_rings(const std::vector<std::string> &args)
return true;
}
+bool simple_wallet::version(const std::vector<std::string> &args)
+{
+ message_writer() << "Monero '" << MONERO_RELEASE_NAME << "' (v" << MONERO_VERSION_FULL << ")";
+ return true;
+}
+
bool simple_wallet::set_always_confirm_transfers(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
{
const auto pwd_container = get_and_verify_password();
@@ -2335,6 +2342,10 @@ simple_wallet::simple_wallet()
boost::bind(&simple_wallet::blackballed, this, _1),
tr("blackballed <output public key>"),
tr("Checks whether an output is blackballed"));
+ m_cmd_binder.set_handler("version",
+ boost::bind(&simple_wallet::version, this, _1),
+ tr("version"),
+ tr("Returns version information"));
m_cmd_binder.set_handler("help",
boost::bind(&simple_wallet::help, this, _1),
tr("help [<command>]"),
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
index f26f69353..39a91c5f5 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -218,6 +218,7 @@ namespace cryptonote
bool blackball(const std::vector<std::string>& args);
bool unblackball(const std::vector<std::string>& args);
bool blackballed(const std::vector<std::string>& args);
+ bool version(const std::vector<std::string>& args);
uint64_t get_daemon_blockchain_height(std::string& err);
bool try_connect_to_daemon(bool silent = false, uint32_t* version = nullptr);