xrpld
Loading...
Searching...
No Matches
xrpl::tests::TestNodeFamily Class Reference

#include <common.h>

Inheritance diagram for xrpl::tests::TestNodeFamily:
Collaboration diagram for xrpl::tests::TestNodeFamily:

Public Member Functions

 TestNodeFamily (beast::Journal j)
NodeStore::Databasedb () override
NodeStore::Database const & db () const override
beast::Journal const & journal () override
std::shared_ptr< FullBelowCachegetFullBelowCache () override
 Return a pointer to the Family Full Below Cache.
std::shared_ptr< TreeNodeCachegetTreeNodeCache () override
 Return a pointer to the Family Tree Node Cache.
void sweep () override
void missingNodeAcquireBySeq (std::uint32_t refNum, uint256 const &nodeHash) override
 Acquire ledger that has a missing node by ledger sequence.
void missingNodeAcquireByHash (uint256 const &refHash, std::uint32_t refNum) override
 Acquire ledger that has a missing node by ledger hash.
void reset () override
beast::ManualClock< std::chrono::steady_clockclock ()

Private Attributes

std::unique_ptr< NodeStore::Databasedb_
std::shared_ptr< FullBelowCachefbCache_
std::shared_ptr< TreeNodeCachetnCache_
TestStopwatch clock_
NodeStore::DummyScheduler scheduler_
beast::Journal const j_

Detailed Description

Definition at line 12 of file common.h.

Constructor & Destructor Documentation

◆ TestNodeFamily()

xrpl::tests::TestNodeFamily::TestNodeFamily ( beast::Journal j)

Definition at line 26 of file common.h.

Member Function Documentation

◆ db() [1/2]

NodeStore::Database & xrpl::tests::TestNodeFamily::db ( )
overridevirtual

Implements xrpl::Family.

Definition at line 45 of file common.h.

◆ db() [2/2]

NodeStore::Database const & xrpl::tests::TestNodeFamily::db ( ) const
nodiscardoverridevirtual

Implements xrpl::Family.

Definition at line 51 of file common.h.

◆ journal()

beast::Journal const & xrpl::tests::TestNodeFamily::journal ( )
overridevirtual

Implements xrpl::Family.

Definition at line 57 of file common.h.

◆ getFullBelowCache()

std::shared_ptr< FullBelowCache > xrpl::tests::TestNodeFamily::getFullBelowCache ( )
overridevirtual

Return a pointer to the Family Full Below Cache.

Implements xrpl::Family.

Definition at line 63 of file common.h.

◆ getTreeNodeCache()

std::shared_ptr< TreeNodeCache > xrpl::tests::TestNodeFamily::getTreeNodeCache ( )
overridevirtual

Return a pointer to the Family Tree Node Cache.

Implements xrpl::Family.

Definition at line 69 of file common.h.

◆ sweep()

void xrpl::tests::TestNodeFamily::sweep ( )
overridevirtual

Implements xrpl::Family.

Definition at line 75 of file common.h.

◆ missingNodeAcquireBySeq()

void xrpl::tests::TestNodeFamily::missingNodeAcquireBySeq ( std::uint32_t refNum,
uint256 const & nodeHash )
overridevirtual

Acquire ledger that has a missing node by ledger sequence.

Parameters
refNumSequence of ledger to acquire.
nodeHashHash of missing node to report in throw.

Implements xrpl::Family.

Definition at line 82 of file common.h.

◆ missingNodeAcquireByHash()

void xrpl::tests::TestNodeFamily::missingNodeAcquireByHash ( uint256 const & refHash,
std::uint32_t refNum )
overridevirtual

Acquire ledger that has a missing node by ledger hash.

Parameters
refHashHash of ledger to acquire.
refNumLedger sequence with missing node.

Implements xrpl::Family.

Definition at line 88 of file common.h.

◆ reset()

void xrpl::tests::TestNodeFamily::reset ( )
overridevirtual

Implements xrpl::Family.

Definition at line 94 of file common.h.

◆ clock()

beast::ManualClock< std::chrono::steady_clock > xrpl::tests::TestNodeFamily::clock ( )

Definition at line 101 of file common.h.

Member Data Documentation

◆ db_

std::unique_ptr<NodeStore::Database> xrpl::tests::TestNodeFamily::db_
private

Definition at line 15 of file common.h.

◆ fbCache_

std::shared_ptr<FullBelowCache> xrpl::tests::TestNodeFamily::fbCache_
private

Definition at line 17 of file common.h.

◆ tnCache_

std::shared_ptr<TreeNodeCache> xrpl::tests::TestNodeFamily::tnCache_
private

Definition at line 18 of file common.h.

◆ clock_

TestStopwatch xrpl::tests::TestNodeFamily::clock_
private

Definition at line 20 of file common.h.

◆ scheduler_

NodeStore::DummyScheduler xrpl::tests::TestNodeFamily::scheduler_
private

Definition at line 21 of file common.h.

◆ j_

beast::Journal const xrpl::tests::TestNodeFamily::j_
private

Definition at line 23 of file common.h.