Skip to content

Commit

Permalink
Test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
RickiNano committed Jan 19, 2025
1 parent 65c3656 commit e443e63
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions nano/node/nodeconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,15 +675,6 @@ std::string nano::node_config::serialize_database_backend (nano::database_backen

nano::database_backend nano::node_config::get_database_backend (nano::tomlconfig & toml)
{
// Check for environment variable
const char * env_backend = std::getenv ("BACKEND");
if (env_backend)
{
std::string backend_string (env_backend);
return backend_string == "rocksdb" ? nano::database_backend::rocksdb : nano::database_backend::lmdb;
}

// Check config file settings
if (toml.has_key ("database_backend"))
{
auto backend_string (toml.get<std::string> ("database_backend"));
Expand Down
2 changes: 1 addition & 1 deletion nano/node/nodeconfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class node_config
uint64_t max_pruning_depth{ 0 };
nano::rocksdb_config rocksdb_config;
nano::lmdb_config lmdb_config;
nano::database_backend database_backend{ nano::database_backend::lmdb };
nano::database_backend database_backend{ std::string (std::getenv ("BACKEND") ? std::getenv ("BACKEND") : "") == "rocksdb" ? nano::database_backend::rocksdb : nano::database_backend::lmdb };
bool enable_upnp{ true };
std::size_t max_ledger_notifications{ 8 };

Expand Down

0 comments on commit e443e63

Please sign in to comment.