rippled
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
ripple::test::NetworkHistory Struct Reference

Utility class for creating validators and ledger history. More...

Collaboration diagram for ripple::test::NetworkHistory:
Collaboration graph
[legend]

Classes

struct  Parameter
 Only reasonable parameters can be honored, e.g cannot hasToReEnable when nUNLSize == 0. More...
 

Public Types

using LedgerHistory = std::vector< std::shared_ptr< Ledger > >
 

Public Member Functions

 NetworkHistory (beast::unit_test::suite &suite, Parameter const &p)
 
void createNodes ()
 
bool createLedgerHistory ()
 create ledger history and apply needed ttUNL_MODIFY tx at flag ledgers
 
std::shared_ptr< STValidationcreateSTVal (std::shared_ptr< Ledger const > const &ledger, NodeID const &v)
 Create a validation.
 
template<class NeedValidation >
void walkHistoryAndAddValidations (NeedValidation &&needVal)
 Walk the ledger history and create validation messages for the ledgers.
 
std::shared_ptr< Ledger const > lastLedger () const
 

Public Attributes

jtx::Env env
 
Parameter param
 
RCLValidationsvalidations
 
std::vector< PublicKeyUNLKeys
 
hash_set< PublicKeyUNLKeySet
 
std::vector< NodeIDUNLNodeIDs
 
hash_set< NodeIDUNLNodeIDSet
 
LedgerHistory history
 
bool goodHistory
 

Detailed Description

Utility class for creating validators and ledger history.

Definition at line 544 of file NegativeUNL_test.cpp.

Member Typedef Documentation

◆ LedgerHistory

Definition at line 546 of file NegativeUNL_test.cpp.

Constructor & Destructor Documentation

◆ NetworkHistory()

ripple::test::NetworkHistory::NetworkHistory ( beast::unit_test::suite suite,
Parameter const &  p 
)

Definition at line 565 of file NegativeUNL_test.cpp.

Member Function Documentation

◆ createNodes()

void ripple::test::NetworkHistory::createNodes ( )

Definition at line 577 of file NegativeUNL_test.cpp.

◆ createLedgerHistory()

bool ripple::test::NetworkHistory::createLedgerHistory ( )

create ledger history and apply needed ttUNL_MODIFY tx at flag ledgers

Returns

Definition at line 594 of file NegativeUNL_test.cpp.

◆ createSTVal()

std::shared_ptr< STValidation > ripple::test::NetworkHistory::createSTVal ( std::shared_ptr< Ledger const > const &  ledger,
NodeID const &  v 
)

Create a validation.

Parameters
ledgerthe ledger the validation validates
vthe validator
Returns
the validation

Definition at line 655 of file NegativeUNL_test.cpp.

◆ walkHistoryAndAddValidations()

template<class NeedValidation >
void ripple::test::NetworkHistory::walkHistoryAndAddValidations ( NeedValidation &&  needVal)

Walk the ledger history and create validation messages for the ledgers.

Template Parameters
NeedValidationa function to decided if a validation is needed
Parameters
needValif a validation is needed for this particular combination of ledger and validator

Definition at line 679 of file NegativeUNL_test.cpp.

◆ lastLedger()

std::shared_ptr< Ledger const > ripple::test::NetworkHistory::lastLedger ( ) const

Definition at line 701 of file NegativeUNL_test.cpp.

Member Data Documentation

◆ env

jtx::Env ripple::test::NetworkHistory::env

Definition at line 706 of file NegativeUNL_test.cpp.

◆ param

Parameter ripple::test::NetworkHistory::param

Definition at line 707 of file NegativeUNL_test.cpp.

◆ validations

RCLValidations& ripple::test::NetworkHistory::validations

Definition at line 708 of file NegativeUNL_test.cpp.

◆ UNLKeys

std::vector<PublicKey> ripple::test::NetworkHistory::UNLKeys

Definition at line 709 of file NegativeUNL_test.cpp.

◆ UNLKeySet

hash_set<PublicKey> ripple::test::NetworkHistory::UNLKeySet

Definition at line 710 of file NegativeUNL_test.cpp.

◆ UNLNodeIDs

std::vector<NodeID> ripple::test::NetworkHistory::UNLNodeIDs

Definition at line 711 of file NegativeUNL_test.cpp.

◆ UNLNodeIDSet

hash_set<NodeID> ripple::test::NetworkHistory::UNLNodeIDSet

Definition at line 712 of file NegativeUNL_test.cpp.

◆ history

LedgerHistory ripple::test::NetworkHistory::history

Definition at line 713 of file NegativeUNL_test.cpp.

◆ goodHistory

bool ripple::test::NetworkHistory::goodHistory

Definition at line 714 of file NegativeUNL_test.cpp.