mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
add legacy memory type called testmemory
This commit is contained in:
@@ -539,6 +539,7 @@ target_sources (rippled PRIVATE
|
||||
#]===============================]
|
||||
src/ripple/nodestore/backend/CassandraFactory.cpp
|
||||
src/ripple/nodestore/backend/MemoryFactory.cpp
|
||||
src/ripple/nodestore/backend/TestMemoryFactory.cpp
|
||||
src/ripple/nodestore/backend/FlatmapFactory.cpp
|
||||
src/ripple/nodestore/backend/NuDBFactory.cpp
|
||||
src/ripple/nodestore/backend/NullFactory.cpp
|
||||
|
||||
@@ -355,18 +355,16 @@ public:
|
||||
mem_backend() const
|
||||
{
|
||||
static bool const isMem =
|
||||
((!section(SECTION_RELATIONAL_DB).empty() &&
|
||||
(!section(SECTION_RELATIONAL_DB).empty() &&
|
||||
boost::beast::iequals(
|
||||
get(section(SECTION_RELATIONAL_DB), "backend"), "memory")) ||
|
||||
(!section("node_db").empty() &&
|
||||
(boost::beast::iequals(
|
||||
get(section("node_db"), "type"), "memory") ||
|
||||
boost::beast::iequals(
|
||||
get(section(SECTION_RELATIONAL_DB), "backend"), "memory")) ||
|
||||
(!section("node_db").empty() &&
|
||||
get(section("node_db"), "type"), "flatmap") ||
|
||||
boost::beast::iequals(
|
||||
get(section("node_db"), "type"), "memory"))) ||
|
||||
((!section(SECTION_RELATIONAL_DB).empty() &&
|
||||
boost::beast::iequals(
|
||||
get(section(SECTION_RELATIONAL_DB), "backend"), "flatmap")) ||
|
||||
(!section("node_db").empty() &&
|
||||
boost::beast::iequals(
|
||||
get(section("node_db"), "type"), "flatmap")));
|
||||
get(section("node_db"), "type"), "testmemory")));
|
||||
|
||||
return isMem;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ setupConfigForUnitTests(Config& cfg)
|
||||
cfg.FEES.account_reserve = XRP(200).value().xrp().drops();
|
||||
cfg.FEES.owner_reserve = XRP(50).value().xrp().drops();
|
||||
|
||||
cfg.overwrite(ConfigSection::nodeDatabase(), "type", "memory");
|
||||
cfg.overwrite(ConfigSection::nodeDatabase(), "type", "testmemory");
|
||||
cfg.overwrite(ConfigSection::nodeDatabase(), "path", "main");
|
||||
cfg.deprecatedClearSection(ConfigSection::importNodeDatabase());
|
||||
cfg.legacy("database_path", "");
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
, j_(j)
|
||||
{
|
||||
Section testSection;
|
||||
testSection.set("type", "memory");
|
||||
testSection.set("type", "testmemory");
|
||||
testSection.set("path", "SHAMap_test");
|
||||
db_ = NodeStore::Manager::instance().make_Database(
|
||||
megabytes(4), scheduler_, 1, testSection, j);
|
||||
|
||||
Reference in New Issue
Block a user