diff options
author | thotbot <thotbot@protonmail.com> | 2019-07-08 13:51:50 +0000 |
---|---|---|
committer | thotbot <thotbot@protonmail.com> | 2019-07-08 13:51:50 +0000 |
commit | 65f29a83c899b44b2f134e0aa34ddfe104244ae4 (patch) | |
tree | 4d18ada136a83c302d10194c81b1cde397ed5d49 | |
parent | Merge pull request #5663 (diff) | |
download | monero-65f29a83c899b44b2f134e0aa34ddfe104244ae4.tar.xz |
simplewallet: add restore_height command
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 9 | ||||
-rw-r--r-- | src/simplewallet/simplewallet.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 02a099811..497e98663 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -801,6 +801,12 @@ bool simple_wallet::encrypted_seed(const std::vector<std::string> &args/* = std: return print_seed(true); } +bool simple_wallet::restore_height(const std::vector<std::string> &args/* = std::vector<std::string>()*/) +{ + success_msg_writer() << m_wallet->get_refresh_from_block_height(); + return true; +} + bool simple_wallet::seed_set_language(const std::vector<std::string> &args/* = std::vector<std::string>()*/) { if (m_wallet->key_on_device()) @@ -2843,6 +2849,9 @@ simple_wallet::simple_wallet() m_cmd_binder.set_handler("seed", boost::bind(&simple_wallet::seed, this, _1), tr("Display the Electrum-style mnemonic seed")); + m_cmd_binder.set_handler("restore_height", + boost::bind(&simple_wallet::restore_height, this, _1), + tr("Display the restore height")); m_cmd_binder.set_handler("set", boost::bind(&simple_wallet::set_variable, this, _1), tr(USAGE_SET_VARIABLE), diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 33b18612c..a24c76083 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -109,6 +109,7 @@ namespace cryptonote bool spendkey(const std::vector<std::string> &args = std::vector<std::string>()); bool seed(const std::vector<std::string> &args = std::vector<std::string>()); bool encrypted_seed(const std::vector<std::string> &args = std::vector<std::string>()); + bool restore_height(const std::vector<std::string> &args = std::vector<std::string>()); /*! * \brief Sets seed language. |