aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/cryptonote_core.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/cryptonote_core.cpp')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 73edde1b7..f5445b48a 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -372,11 +372,10 @@ namespace cryptonote
if(options.size() >= 3 && !safemode)
{
- blocks_per_sync = atoll(options[2].c_str());
- if(blocks_per_sync > 5000)
- blocks_per_sync = 5000;
- if(blocks_per_sync == 0)
- blocks_per_sync = 1;
+ char *endptr;
+ uint64_t bps = strtoull(options[2].c_str(), &endptr, 0);
+ if (*endptr == '\0')
+ blocks_per_sync = bps;
}
bool auto_remove_logs = command_line::get_arg(vm, command_line::arg_db_auto_remove_logs) != 0;