rippled
Public Member Functions | List of all members
ripple::InvariantChecker_PROTOTYPE Class Reference

Prototype for invariant check implementations. More...

Public Member Functions

 InvariantChecker_PROTOTYPE ()=default
 
void visitEntry (bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after)
 called for each ledger entry in the current transaction. More...
 
bool finalize (STTx const &tx, TER const tec, XRPAmount const fee, ReadView const &view, beast::Journal const &j)
 called after all ledger entries have been visited to determine the final status of the check More...
 

Detailed Description

Prototype for invariant check implementations.

THIS CLASS DOES NOT EXIST - or rather it exists in documentation only to communicate the interface required of any invariant checker. Any invariant check implementation should implement the public methods documented here.

Definition at line 46 of file InvariantCheck.h.

Constructor & Destructor Documentation

◆ InvariantChecker_PROTOTYPE()

ripple::InvariantChecker_PROTOTYPE::InvariantChecker_PROTOTYPE ( )
explicitdefault

Member Function Documentation

◆ visitEntry()

void ripple::InvariantChecker_PROTOTYPE::visitEntry ( bool  isDelete,
std::shared_ptr< SLE const > const &  before,
std::shared_ptr< SLE const > const &  after 
)

called for each ledger entry in the current transaction.

Parameters
isDeletetrue if the SLE is being deleted
beforeledger entry before modification by the transaction
afterledger entry after modification by the transaction

◆ finalize()

bool ripple::InvariantChecker_PROTOTYPE::finalize ( STTx const &  tx,
TER const  tec,
XRPAmount const  fee,
ReadView const &  view,
beast::Journal const &  j 
)

called after all ledger entries have been visited to determine the final status of the check

Parameters
txthe transaction being applied
tecthe current TER result of the transaction
feethe fee actually charged for this transaction
viewa ReadView of the ledger being modified
jjournal for logging
Returns
true if check passes, false if it fails