rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
ripple::tests::TestNodeFamily Class Reference

#include <common.h>

Inheritance diagram for ripple::tests::TestNodeFamily:
Inheritance graph
[legend]
Collaboration diagram for ripple::tests::TestNodeFamily:
Collaboration graph
[legend]

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::manual_clock< 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()

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

Definition at line 26 of file common.h.

Member Function Documentation

◆ db() [1/2]

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

Implements ripple::Family.

Definition at line 47 of file common.h.

◆ db() [2/2]

NodeStore::Database const & ripple::tests::TestNodeFamily::db ( ) const
overridevirtual

Implements ripple::Family.

Definition at line 53 of file common.h.

◆ journal()

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

Implements ripple::Family.

Definition at line 59 of file common.h.

◆ getFullBelowCache()

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

Return a pointer to the Family Full Below Cache.

Implements ripple::Family.

Definition at line 65 of file common.h.

◆ getTreeNodeCache()

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

Return a pointer to the Family Tree Node Cache.

Implements ripple::Family.

Definition at line 71 of file common.h.

◆ sweep()

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

Implements ripple::Family.

Definition at line 77 of file common.h.

◆ missingNodeAcquireBySeq()

void ripple::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 ripple::Family.

Definition at line 84 of file common.h.

◆ missingNodeAcquireByHash()

void ripple::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 ripple::Family.

Definition at line 91 of file common.h.

◆ reset()

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

Implements ripple::Family.

Definition at line 98 of file common.h.

◆ clock()

beast::manual_clock< std::chrono::steady_clock > ripple::tests::TestNodeFamily::clock ( )

Definition at line 105 of file common.h.

Member Data Documentation

◆ db_

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

Definition at line 15 of file common.h.

◆ fbCache_

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

Definition at line 17 of file common.h.

◆ tnCache_

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

Definition at line 18 of file common.h.

◆ clock_

TestStopwatch ripple::tests::TestNodeFamily::clock_
private

Definition at line 20 of file common.h.

◆ scheduler_

NodeStore::DummyScheduler ripple::tests::TestNodeFamily::scheduler_
private

Definition at line 21 of file common.h.

◆ j_

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

Definition at line 23 of file common.h.