aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core
diff options
context:
space:
mode:
authorJesus Ramirez <jesus.rami.serra@gmail.com>2019-06-26 10:39:41 -0400
committerLev Sizov <levsizov2015@outlook.com>2019-09-16 16:18:05 +0200
commitf9b3f6ef3b1ebde4dc9a1ef8e70b4ef7d807cede (patch)
treedcedafd5f01ae480df6c1f10688def08ec0b1800 /src/cryptonote_core
parentMerge pull request #5793 (diff)
downloadmonero-f9b3f6ef3b1ebde4dc9a1ef8e70b4ef7d807cede.tar.xz
Removed Berkeley DB and db switching logic
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r--src/cryptonote_core/blockchain.cpp4
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp5
2 files changed, 4 insertions, 5 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index dab1a0a96..39dcd5f5b 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -1055,7 +1055,7 @@ bool Blockchain::switch_to_alternative_blockchain(std::list<block_extended_info>
for(auto alt_ch_iter = alt_chain.begin(); alt_ch_iter != alt_chain.end(); alt_ch_iter++)
{
const auto &bei = *alt_ch_iter;
- block_verification_context bvc = boost::value_initialized<block_verification_context>();
+ block_verification_context bvc = {};
// add block to main chain
bool r = handle_block_to_main_chain(bei.bl, bvc);
@@ -1412,7 +1412,7 @@ bool Blockchain::create_block_template(block& b, const crypto::hash *from_block,
//we have new block in alternative chain
std::list<block_extended_info> alt_chain;
- block_verification_context bvc = boost::value_initialized<block_verification_context>();
+ block_verification_context bvc = {};
std::vector<uint64_t> timestamps;
if (!build_alt_chain(*from_block, alt_chain, timestamps, bvc))
return false;
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index a3a92ab60..b67f50c96 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -454,7 +454,6 @@ namespace cryptonote
bool r = handle_command_line(vm);
CHECK_AND_ASSERT_MES(r, false, "Failed to handle command line");
- std::string db_type = command_line::get_arg(vm, cryptonote::arg_db_type);
std::string db_sync_mode = command_line::get_arg(vm, cryptonote::arg_db_sync_mode);
bool db_salvage = command_line::get_arg(vm, cryptonote::arg_db_salvage) != 0;
bool fast_sync = command_line::get_arg(vm, arg_fast_block_sync) != 0;
@@ -488,10 +487,10 @@ namespace cryptonote
// folder might not be a directory, etc, etc
catch (...) { }
- std::unique_ptr<BlockchainDB> db(new_db(db_type));
+ std::unique_ptr<BlockchainDB> db(new_db());
if (db == NULL)
{
- LOG_ERROR("Attempted to use non-existent database type");
+ LOG_ERROR("Failed to initialize a database");
return false;
}