rippled
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
xrpl::ValidClawback Class Reference

Invariant: Token holder's trustline balance cannot be negative after Clawback. More...

#include <InvariantCheck.h>

Collaboration diagram for xrpl::ValidClawback:
Collaboration graph
[legend]

Public Member Functions

void visitEntry (bool, std::shared_ptr< SLE const > const &, std::shared_ptr< SLE const > const &)
 
bool finalize (STTx const &, TER const, XRPAmount const, ReadView const &, beast::Journal const &) const
 

Private Attributes

std::uint32_t trustlinesChanged = 0
 
std::uint32_t mptokensChanged = 0
 

Detailed Description

Invariant: Token holder's trustline balance cannot be negative after Clawback.

We iterate all the trust lines affected by this transaction and ensure that no more than one trustline is modified, and also holder's balance is non-negative.

Definition at line 322 of file InvariantCheck.h.

Member Function Documentation

◆ visitEntry()

void xrpl::ValidClawback::visitEntry ( bool  ,
std::shared_ptr< SLE const > const &  before,
std::shared_ptr< SLE const > const &   
)

Definition at line 740 of file InvariantCheck.cpp.

◆ finalize()

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

Definition at line 753 of file InvariantCheck.cpp.

Member Data Documentation

◆ trustlinesChanged

std::uint32_t xrpl::ValidClawback::trustlinesChanged = 0
private

Definition at line 324 of file InvariantCheck.h.

◆ mptokensChanged

std::uint32_t xrpl::ValidClawback::mptokensChanged = 0
private

Definition at line 325 of file InvariantCheck.h.