move db specific options to BlockchainDB

Avoids common depending on blockchain_db, which can cause
link errors.
This commit is contained in:
moneromooo-monero 2017-08-29 11:14:42 +01:00
parent 72b5f37f58
commit a95e460c71
No known key found for this signature in database
GPG key ID: 686F07454D6CEFC3
6 changed files with 40 additions and 27 deletions

View file

@ -32,7 +32,6 @@
#include <boost/algorithm/string/compare.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <unordered_set>
#include "blockchain_db/db_types.h"
#include "common/i18n.h"
#include "cryptonote_config.h"
#include "string_tools.h"
@ -96,22 +95,6 @@ namespace command_line
, "checkpoints from DNS server will be enforced"
, false
};
std::string arg_db_type_description = "Specify database type, available: " + cryptonote::blockchain_db_types(", ");
const command_line::arg_descriptor<std::string> arg_db_type = {
"db-type"
, arg_db_type_description.c_str()
, DEFAULT_DB_TYPE
};
const command_line::arg_descriptor<std::string> arg_db_sync_mode = {
"db-sync-mode"
, "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."

View file

@ -212,9 +212,6 @@ namespace command_line
extern const arg_descriptor<int> arg_test_dbg_lock_sleep;
extern const arg_descriptor<bool, false> arg_testnet_on;
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;