aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-08-15 20:57:26 +0200
committerRiccardo Spagni <ric@spagni.net>2017-08-15 20:57:26 +0200
commit3ff67323b73ef193c56a025d4a682554adb40dea (patch)
tree1e8bee3096c02f037d3e7bcc4dfb6835432937d4 /src/common
parentMerge pull request #2293 (diff)
parentcore: add --db-salvage command line flag (diff)
downloadmonero-3ff67323b73ef193c56a025d4a682554adb40dea.tar.xz
Merge pull request #2288
c6e200a8 core: add --db-salvage command line flag (moneromooo-monero)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/command_line.cpp5
-rw-r--r--src/common/command_line.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp
index 8c2796bbe..5f60bef89 100644
--- a/src/common/command_line.cpp
+++ b/src/common/command_line.cpp
@@ -107,6 +107,11 @@ namespace command_line
, "Specify sync option, using format [safe|fast|fastest]:[sync|async]:[nblocks_per_sync]."
, "fast:async:1000"
};
+ const arg_descriptor<bool> arg_db_salvage = {
+ "db-salvage"
+ , "Try to salvage a blockchain database if it seems corrupted"
+ , false
+ };
const command_line::arg_descriptor<uint64_t> arg_fast_block_sync = {
"fast-block-sync"
, "Sync up most of the way by using embedded, known block hashes."
diff --git a/src/common/command_line.h b/src/common/command_line.h
index 2110b8849..03ba35a5b 100644
--- a/src/common/command_line.h
+++ b/src/common/command_line.h
@@ -214,6 +214,7 @@ namespace command_line
extern const arg_descriptor<bool> arg_dns_checkpoints;
extern const arg_descriptor<std::string> arg_db_type;
extern const arg_descriptor<std::string> arg_db_sync_mode;
+ extern const arg_descriptor<bool, false> arg_db_salvage;
extern const arg_descriptor<uint64_t> arg_fast_block_sync;
extern const arg_descriptor<uint64_t> arg_prep_blocks_threads;
extern const arg_descriptor<uint64_t> arg_show_time_stats;