diff options
author | Riccardo Spagni <ric@spagni.net> | 2014-08-02 11:13:26 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2014-08-02 11:13:26 +0200 |
commit | ba99a8633319cf11e12c63b80a118588cf5c6aae (patch) | |
tree | 4d2fda0575eff0ae88d702c7c9e35cd3b1f8c4b3 /src/simplewallet/simplewallet.cpp | |
parent | Merge pull request #64 from mikezackles/bytecoin_tx_pool_tmp (diff) | |
parent | #36 make it compile and work properly (diff) | |
download | monero-ba99a8633319cf11e12c63b80a118588cf5c6aae.tar.xz |
Merge pull request #73 from jakoblind/refresh_height
Optional height parameter for wallet refresh
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index f2693b2d0..4bb5389e4 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -622,12 +622,25 @@ bool simple_wallet::refresh(const std::vector<std::string>& args) return true; message_writer() << "Starting refresh..."; + size_t fetched_blocks = 0; + size_t start_height = 0; + if(!args.empty()){ + try + { + start_height = boost::lexical_cast<int>( args[0] ); + } + catch(const boost::bad_lexical_cast &) + { + start_height = 0; + } + } + bool ok = false; std::ostringstream ss; try { - m_wallet->refresh(fetched_blocks); + m_wallet->refresh(start_height, fetched_blocks); ok = true; // Clear line "Height xxx of xxx" std::cout << "\r \r"; |