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

Invariants: Pseudo-accounts have valid and consistent properties. More...

#include <InvariantCheck.h>

Collaboration diagram for xrpl::ValidPseudoAccounts:

Public Member Functions

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

Private Attributes

std::vector< std::string > errors_
std::map< AccountID, std::vector< uint256 > > ownerDirAdditions_

Detailed Description

Invariants: Pseudo-accounts have valid and consistent properties.

Pseudo-accounts have certain properties, and some of those properties are unique to pseudo-accounts. Check that all pseudo-accounts are following the rules, and that only pseudo-accounts look like pseudo-accounts.

Post-fixCleanup3_5_0, a pseudo-account also owns only entries that belong to its own AMM, Vault or LoanBroker:

  • AMM: its AMM entry, its holdings of the two pool assets, and the trust lines of its LP token,
  • Vault: its share MPTokenIssuance, its holding of the vault asset, and the LoanBrokers operating on this vault,
  • LoanBroker: its Loans and its holding of the vault asset (the cover).

A pseudo-account cannot sign transactions, so it could never accept or remove any other object linked into its owner directory. Such an object would pin the directory and block deletion of the owning object.

Definition at line 382 of file InvariantCheck.h.

Member Function Documentation

◆ visitEntry()

void xrpl::ValidPseudoAccounts::visitEntry ( bool isDelete,
SLE::ConstRef before,
SLE::ConstRef after )

Definition at line 1092 of file InvariantCheck.cpp.

◆ finalize()

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

Definition at line 1187 of file InvariantCheck.cpp.

Member Data Documentation

◆ errors_

std::vector<std::string> xrpl::ValidPseudoAccounts::errors_
private

Definition at line 384 of file InvariantCheck.h.

◆ ownerDirAdditions_

std::map<AccountID, std::vector<uint256> > xrpl::ValidPseudoAccounts::ownerDirAdditions_
private

Definition at line 389 of file InvariantCheck.h.