mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 15:40:26 +00:00
Merge remote-tracking branch 'XRPLF/develop' into ximinez/online-delete-gaps
* XRPLF/develop: (22 commits) test: Add null check unit test for `Oracle::aggregatePrice` (7306) ci: Patch conan recipe for Nix to be able to use on macOS (7532) ci: Run sanitizers on release builds too (7527) fix: Correct hybrid offer deletion on credential expiry (6843) ci: Make sanitizer flags lists in the profile, not a string (7449) ci: Make configurations launch on certain event types (7447) fix: Add [[maybe_unused]] to fix320Enabled for assert=OFF builds (7446) ci: Add `gh` and `file` to nix packages (7444) fix: Disable transaction invariants (7409) perf: Dispatch "hasInvalidAmount()" on type tag instead of dynamic_cast (7402) refactor: Retire fixUniversalNumber amendment (5962) test: Do not create data directory for memory databases (7323) ci: Launch upload-conan-deps on profile change (7442) fix: Fix Number comparison operator (7406) feat: Use C++ 23 standard (7431) refactor: Introduce XRPL_ASSERT_IF for amendment-gated assertions (7378) refactor: Change config section and key string literals into constants (7095) refactor: Use `std::move` and `std::string_view` where possible (7424) refactor: Use const function arguments where possible (7423) ci: Use XRPLF/actions build-multiarch-image workflow (7428) ...
This commit is contained in:
@@ -9,12 +9,13 @@
|
||||
#include <xrpld/app/misc/SHAMapStore.h>
|
||||
#include <xrpld/app/rdb/backend/SQLiteDatabase.h>
|
||||
#include <xrpld/core/Config.h>
|
||||
#include <xrpld/core/ConfigSections.h>
|
||||
|
||||
#include <xrpl/basics/ByteUtilities.h>
|
||||
#include <xrpl/basics/Number.h>
|
||||
#include <xrpl/basics/base_uint.h>
|
||||
#include <xrpl/beast/unit_test/suite.h>
|
||||
#include <xrpl/config/BasicConfig.h>
|
||||
#include <xrpl/config/Constants.h>
|
||||
#include <xrpl/json/json_value.h>
|
||||
#include <xrpl/nodestore/Backend.h>
|
||||
#include <xrpl/nodestore/detail/DatabaseRotatingImp.h>
|
||||
@@ -54,7 +55,7 @@ class SHAMapStore_test : public beast::unit_test::Suite
|
||||
advisoryDelete(std::unique_ptr<Config> cfg)
|
||||
{
|
||||
cfg = onlineDelete(std::move(cfg));
|
||||
cfg->section(ConfigSection::nodeDatabase()).set("advisory_delete", "1");
|
||||
cfg->section(Sections::kNodeDatabase).set(Keys::kAdvisoryDelete, "1");
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@@ -493,13 +494,13 @@ public:
|
||||
std::unique_ptr<NodeStore::Backend>
|
||||
makeBackendRotating(jtx::Env& env, NodeStoreScheduler& scheduler, std::string path)
|
||||
{
|
||||
Section section{env.app().config().section(ConfigSection::nodeDatabase())};
|
||||
Section section{env.app().config().section(Sections::kNodeDatabase)};
|
||||
boost::filesystem::path newPath;
|
||||
|
||||
if (!BEAST_EXPECT(path.size()))
|
||||
return {};
|
||||
newPath = path;
|
||||
section.set("path", newPath.string());
|
||||
section.set(Keys::kPath, newPath.string());
|
||||
|
||||
auto backend{NodeStore::Manager::instance().makeBackend(
|
||||
section,
|
||||
@@ -523,21 +524,21 @@ public:
|
||||
/////////////////////////////////////////////////////////////
|
||||
// Create NodeStore with two backends to allow online deletion of data.
|
||||
// Normally, SHAMapStoreImp handles all these details.
|
||||
auto nscfg = env.app().config().section(ConfigSection::nodeDatabase());
|
||||
auto nscfg = env.app().config().section(Sections::kNodeDatabase);
|
||||
|
||||
// Provide default values.
|
||||
if (!nscfg.exists("cache_size"))
|
||||
if (!nscfg.exists(Keys::kCacheSize))
|
||||
{
|
||||
nscfg.set(
|
||||
"cache_size",
|
||||
Keys::kCacheSize,
|
||||
std::to_string(
|
||||
env.app().config().getValueFor(SizedItem::TreeCacheSize, std::nullopt)));
|
||||
}
|
||||
|
||||
if (!nscfg.exists("cache_age"))
|
||||
if (!nscfg.exists(Keys::kCacheAge))
|
||||
{
|
||||
nscfg.set(
|
||||
"cache_age",
|
||||
Keys::kCacheAge,
|
||||
std::to_string(
|
||||
env.app().config().getValueFor(SizedItem::TreeCacheAge, std::nullopt)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user