aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/simplewallet/simplewallet.cpp')
-rw-r--r--src/simplewallet/simplewallet.cpp15
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";