From 046ab33d1bd11d3f015c51025f0d30e3db1fcd12 Mon Sep 17 00:00:00 2001 From: Miguel Herranz Date: Tue, 10 Jan 2017 11:17:48 +0100 Subject: [PATCH 1/4] Remove berkeley from blockchain_db_types --- src/blockchain_db/db_types.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/blockchain_db/db_types.h b/src/blockchain_db/db_types.h index ca4abf21..67afe040 100644 --- a/src/blockchain_db/db_types.h +++ b/src/blockchain_db/db_types.h @@ -34,7 +34,6 @@ namespace cryptonote const std::unordered_set blockchain_db_types = { "lmdb" - , "berkeley" }; } // namespace cryptonote From e309055819a8801d6caaa337d581cbb15444f291 Mon Sep 17 00:00:00 2001 From: Miguel Herranz Date: Tue, 10 Jan 2017 11:44:01 +0100 Subject: [PATCH 2/4] Show available types for db-type command --- src/common/command_line.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index 28879e09..a432062a 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -31,6 +31,8 @@ #include "command_line.h" #include #include +#include +#include "blockchain_db/db_types.h" #include "common/i18n.h" #include "cryptonote_config.h" #include "string_tools.h" @@ -88,9 +90,10 @@ namespace command_line , "checkpoints from DNS server will be enforced" , false }; + std::string arg_db_type_description = "Specify database type, available: " + boost::algorithm::join(cryptonote::blockchain_db_types, ", "); const command_line::arg_descriptor arg_db_type = { "db-type" - , "Specify database type" + , arg_db_type_description.c_str() , DEFAULT_DB_TYPE }; const command_line::arg_descriptor arg_db_sync_mode = { From 1229c685875376aedae7d0aba900fba6fd9d5cf6 Mon Sep 17 00:00:00 2001 From: Miguel Herranz Date: Tue, 10 Jan 2017 11:46:12 +0100 Subject: [PATCH 3/4] Remove berkeley from db_type initialization --- src/cryptonote_core/cryptonote_core.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 4010d3d4..a81f2d7e 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -301,18 +301,6 @@ namespace cryptonote DBS_FAST_MODE = MDB_NORDAHEAD | MDB_NOSYNC; DBS_FASTEST_MODE = MDB_NORDAHEAD | MDB_NOSYNC | MDB_WRITEMAP | MDB_MAPASYNC; } - else if (db_type == "berkeley") - { -#if defined(BERKELEY_DB) - db = new BlockchainBDB(); - DBS_FAST_MODE = DB_TXN_WRITE_NOSYNC; - DBS_FASTEST_MODE = DB_TXN_NOSYNC; - DBS_SAFE_MODE = DB_TXN_SYNC; -#else - LOG_ERROR("BerkeleyDB support disabled."); - return false; -#endif - } else { LOG_ERROR("Attempted to use non-existent database type"); From aff28178e631345065c21e238f469459750c542d Mon Sep 17 00:00:00 2001 From: Miguel Herranz Date: Tue, 10 Jan 2017 11:49:45 +0100 Subject: [PATCH 4/4] Remove db-auto-remove-logs --- src/common/command_line.cpp | 5 ----- src/common/command_line.h | 1 - src/cryptonote_core/cryptonote_core.cpp | 3 --- 3 files changed, 9 deletions(-) diff --git a/src/common/command_line.cpp b/src/common/command_line.cpp index a432062a..d9585925 100644 --- a/src/common/command_line.cpp +++ b/src/common/command_line.cpp @@ -111,11 +111,6 @@ namespace command_line , "Max number of threads to use when preparing block hashes in groups." , 4 }; - const command_line::arg_descriptor arg_db_auto_remove_logs = { - "db-auto-remove-logs" - , "For BerkeleyDB only. Remove transactions logs automatically." - , 1 - }; const command_line::arg_descriptor arg_show_time_stats = { "show-time-stats" , "Show time-stats when processing blocks/txs and disk synchronization." diff --git a/src/common/command_line.h b/src/common/command_line.h index 98c115bb..3f0919e9 100644 --- a/src/common/command_line.h +++ b/src/common/command_line.h @@ -217,7 +217,6 @@ namespace command_line extern const arg_descriptor arg_db_sync_mode; extern const arg_descriptor arg_fast_block_sync; extern const arg_descriptor arg_prep_blocks_threads; - extern const arg_descriptor arg_db_auto_remove_logs; extern const arg_descriptor arg_show_time_stats; extern const arg_descriptor arg_block_sync_size; } diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index a81f2d7e..b2099641 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -141,7 +141,6 @@ namespace cryptonote command_line::add_arg(desc, command_line::arg_fast_block_sync); command_line::add_arg(desc, command_line::arg_db_sync_mode); command_line::add_arg(desc, command_line::arg_show_time_stats); - command_line::add_arg(desc, command_line::arg_db_auto_remove_logs); command_line::add_arg(desc, command_line::arg_block_sync_size); } //----------------------------------------------------------------------------------------------- @@ -368,8 +367,6 @@ namespace cryptonote blocks_per_sync = bps; } - bool auto_remove_logs = command_line::get_arg(vm, command_line::arg_db_auto_remove_logs) != 0; - db->set_auto_remove_logs(auto_remove_logs); db->open(filename, db_flags); if(!db->m_open) return false;