xrpld
Loading...
Searching...
No Matches
xrpl::ValidLoanBroker Class Reference

Invariants: Loan brokers are internally consistent. More...

#include <LoanBrokerInvariant.h>

Collaboration diagram for xrpl::ValidLoanBroker:

Classes

struct  BrokerInfo

Public Member Functions

void visitEntry (bool, SLE::const_ref, SLE::const_ref)
bool finalize (STTx const &, TER const, XRPAmount const, ReadView const &, beast::Journal const &)

Static Private Member Functions

static bool goodZeroDirectory (ReadView const &view, SLE::const_ref dir, beast::Journal const &j)

Private Attributes

std::map< uint256, BrokerInfobrokers_
std::vector< SLE::const_pointerlines_
std::vector< SLE::const_pointermpts_

Detailed Description

Invariants: Loan brokers are internally consistent.

  1. If LoanBroker.OwnerCount = 0 the DirectoryNode will have at most one node (the root), which will only hold entries for RippleState or MPToken objects.

Definition at line 22 of file LoanBrokerInvariant.h.

Member Function Documentation

◆ goodZeroDirectory()

bool xrpl::ValidLoanBroker::goodZeroDirectory ( ReadView const & view,
SLE::const_ref dir,
beast::Journal const & j )
staticprivate

Definition at line 49 of file LoanBrokerInvariant.cpp.

◆ visitEntry()

void xrpl::ValidLoanBroker::visitEntry ( bool isDelete,
SLE::const_ref before,
SLE::const_ref after )

Definition at line 21 of file LoanBrokerInvariant.cpp.

◆ finalize()

bool xrpl::ValidLoanBroker::finalize ( STTx const & tx,
TER const ,
XRPAmount const ,
ReadView const & view,
beast::Journal const & j )

Definition at line 90 of file LoanBrokerInvariant.cpp.

Member Data Documentation

◆ brokers_

std::map<uint256, BrokerInfo> xrpl::ValidLoanBroker::brokers_
private

Definition at line 36 of file LoanBrokerInvariant.h.

◆ lines_

std::vector<SLE::const_pointer> xrpl::ValidLoanBroker::lines_
private

Definition at line 39 of file LoanBrokerInvariant.h.

◆ mpts_

std::vector<SLE::const_pointer> xrpl::ValidLoanBroker::mpts_
private

Definition at line 42 of file LoanBrokerInvariant.h.