This commit is contained in:
Richard Holland
2024-10-21 18:11:56 +11:00
parent c66857321c
commit 019d0ee527
4 changed files with 14 additions and 14 deletions

View File

@@ -19,9 +19,9 @@
#include <ripple/app/main/Application.h>
#include <ripple/app/rdb/RelationalDatabase.h>
#include <ripple/app/rdb/backend/MemoryDatabase.h>
#include <ripple/core/ConfigSections.h>
#include <ripple/nodestore/DatabaseShard.h>
#include <ripple/app/rdb/backend/MemoryDatabase.h>
namespace ripple {

View File

@@ -32,10 +32,10 @@ struct MemoryDB
boost::unordered::concurrent_flat_map<
uint256,
std::shared_ptr<NodeObject>,
base_uint_hasher> table;
base_uint_hasher>
table;
};
class MemoryFactory : public Factory
{
private:
@@ -183,9 +183,7 @@ public:
for_each(std::function<void(std::shared_ptr<NodeObject>)> f) override
{
assert(db_);
db_->table.visit_all([&f](const auto& entry) {
f(entry.second);
});
db_->table.visit_all([&f](const auto& entry) { f(entry.second); });
}
int

View File

@@ -38,9 +38,9 @@
#include <ripple/rpc/json_body.h>
#include <ripple/server/SimpleWriter.h>
#include <ripple/core/ConfigSections.h>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <ripple/core/ConfigSections.h>
namespace ripple {
@@ -139,7 +139,9 @@ OverlayImpl::OverlayImpl(
config,
collector,
app.config().section(SECTION_RELATIONAL_DB).empty() ||
!boost::iequals(get(app.config().section(SECTION_RELATIONAL_DB), "backend"), "memory")))
!boost::iequals(
get(app.config().section(SECTION_RELATIONAL_DB), "backend"),
"memory")))
, m_resolver(resolver)
, next_id_(1)
, timer_count_(0)

View File

@@ -17,18 +17,18 @@
*/
//==============================================================================
#include <ripple/core/ConfigSections.h>
#include <ripple/peerfinder/PeerfinderManager.h>
#include <ripple/peerfinder/impl/Checker.h>
#include <ripple/peerfinder/impl/InMemoryStore.h>
#include <ripple/peerfinder/impl/Logic.h>
#include <ripple/peerfinder/impl/SourceStrings.h>
#include <ripple/peerfinder/impl/StoreSqdb.h>
#include <ripple/peerfinder/impl/InMemoryStore.h>
#include <boost/asio/io_service.hpp>
#include <boost/utility/in_place_factory.hpp>
#include <memory>
#include <optional>
#include <thread>
#include <ripple/core/ConfigSections.h>
namespace ripple {
namespace PeerFinder {
@@ -59,9 +59,9 @@ public:
, work_(std::in_place, std::ref(io_service_))
, m_clock(clock)
, m_journal(journal)
, m_store(useSqLiteStore
? static_cast<Store*>(new StoreSqdb(journal))
: static_cast<Store*>(new InMemoryStore()))
, m_store(
useSqLiteStore ? static_cast<Store*>(new StoreSqdb(journal))
: static_cast<Store*>(new InMemoryStore()))
, checker_(io_service_)
, m_logic(clock, *m_store, checker_, journal)
, m_config(config)
@@ -222,7 +222,7 @@ public:
{
if (auto sqdb = dynamic_cast<StoreSqdb*>(m_store.get()))
sqdb->open(m_config);
m_logic.load();
m_logic.load();
}
//--------------------------------------------------------------------------