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)
node_store::Database & db () override
node_store::Database const & db () const override
beast::Journal const & journal () override
std::shared_ptr< FullBelowCache > getFullBelowCache () override
 Return a pointer to the Family Full Below Cache.
std::shared_ptr< TreeNodeCache > getTreeNodeCache () 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
TestStopwatch & clock ()

Private Attributes

std::unique_ptr< node_store::Database > db_
std::shared_ptr< FullBelowCache > fbCache_
std::shared_ptr< TreeNodeCache > tnCache_
TestStopwatch clock_
node_store::DummyScheduler scheduler_
beast::Journal const j_

Detailed Description

Definition at line 24 of file common.h.

Constructor & Destructor Documentation

◆ TestNodeFamily()

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

Definition at line 38 of file common.h.

Member Function Documentation

◆ db() [1/2]

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

Implements xrpl::Family.

Definition at line 57 of file common.h.

◆ db() [2/2]

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

Implements xrpl::Family.

Definition at line 63 of file common.h.

◆ journal()

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

Implements xrpl::Family.

Definition at line 69 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 75 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 81 of file common.h.

◆ sweep()

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

Implements xrpl::Family.

Definition at line 87 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 94 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 102 of file common.h.

◆ reset()

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

Implements xrpl::Family.

Definition at line 110 of file common.h.

◆ clock()

TestStopwatch & xrpl::tests::TestNodeFamily::clock ( )

Definition at line 117 of file common.h.

Member Data Documentation

◆ db_

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

Definition at line 27 of file common.h.

◆ fbCache_

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

Definition at line 29 of file common.h.

◆ tnCache_

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

Definition at line 30 of file common.h.

◆ clock_

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

Definition at line 32 of file common.h.

◆ scheduler_

node_store::DummyScheduler xrpl::tests::TestNodeFamily::scheduler_
private

Definition at line 33 of file common.h.

◆ j_

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

Definition at line 35 of file common.h.