20 #ifndef RIPPLE_SHAMAP_TESTS_COMMON_H_INCLUDED
21 #define RIPPLE_SHAMAP_TESTS_COMMON_H_INCLUDED
23 #include <ripple/basics/chrono.h>
24 #include <ripple/nodestore/DatabaseShard.h>
25 #include <ripple/nodestore/DummyScheduler.h>
26 #include <ripple/nodestore/Manager.h>
27 #include <ripple/shamap/Family.h>
48 "App family full below cache",
52 "App family tree node cache",
54 std::chrono::minutes{1},
60 testSection.
set(
"type",
"memory");
61 testSection.
set(
"path",
"SHAMap_test");
111 Throw<std::runtime_error>(
"missing node");
118 Throw<std::runtime_error>(
"missing node");
Simple NodeStore Scheduler that just peforms the tasks synchronously.
Holds a collection of configuration values.
Persistency layer for NodeObject.
NodeStore::Database & db() override
Remembers which tree keys have all descendants resident.
beast::Journal const & journal() override
std::shared_ptr< FullBelowCache > fbCache_
void missingNodeAcquireBySeq(std::uint32_t refNum, uint256 const &nodeHash) override
Acquire ledger that has a missing node by ledger sequence.
constexpr auto megabytes(T value) noexcept
std::shared_ptr< TreeNodeCache > getTreeNodeCache(std::uint32_t) override
Return a pointer to the Family Tree Node Cache.
A generic endpoint for log messages.
TestNodeFamily(beast::Journal j)
std::unique_ptr< NodeStore::Database > db_
NodeStore::DummyScheduler scheduler_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void set(std::string const &key, std::string const &value)
Set a key/value pair.
std::shared_ptr< FullBelowCache > getFullBelowCache(std::uint32_t) override
Return a pointer to the Family Full Below Cache.
beast::manual_clock< std::chrono::steady_clock > clock()
bool isShardBacked() const override
void missingNodeAcquireByHash(uint256 const &refHash, std::uint32_t refNum) override
Acquire ledger that has a missing node by ledger hash.
NodeStore::Database const & db() const override
std::shared_ptr< TreeNodeCache > tnCache_
static Manager & instance()
Returns the instance of the manager singleton.
virtual std::unique_ptr< Database > make_Database(std::size_t burstSize, Scheduler &scheduler, int readThreads, Section const &backendParameters, beast::Journal journal)=0
Construct a NodeStore database.