|
xrpld
|
#include <MPTInvariant.h>

Classes | |
| struct | Value |
Public Member Functions | |
| void | visitEntry (bool isDelete, std::shared_ptr< SLE const > const &before, std::shared_ptr< SLE const > const &after) |
| Track MPT balance changes and deleted authorization state. | |
| bool | finalize (STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j) |
| Verify MPT transfer authorization invariants. | |
Private Member Functions | |
| bool | isAuthorized (ReadView const &view, MPTID const &mptid, AccountID const &holder, bool requireAuth) const |
| Check whether a holder is authorized to send or receive an MPToken. | |
Private Attributes | |
| hash_map< uint192, hash_map< AccountID, Value > > | amount_ |
| hash_map< uint256, bool > | deletedAuthorized_ |
Definition at line 192 of file MPTInvariant.h.
| void xrpl::ValidMPTTransfer::visitEntry | ( | bool | isDelete, |
| std::shared_ptr< SLE const > const & | before, | ||
| std::shared_ptr< SLE const > const & | after ) |
Track MPT balance changes and deleted authorization state.
| isDelete | Whether the ledger entry is being deleted. |
| before | The ledger entry before transaction application. |
| after | The ledger entry after transaction application. |
Definition at line 774 of file MPTInvariant.cpp.
| bool xrpl::ValidMPTTransfer::finalize | ( | STTx const & | tx, |
| TER const | result, | ||
| XRPAmount const | fee, | ||
| ReadView const & | view, | ||
| beast::Journal const & | j ) |
Verify MPT transfer authorization invariants.
| tx | The transaction being checked. |
| result | The transaction result code. |
| fee | The fee charged by the transaction. |
| view | The ledger view after transaction application. |
| j | Journal used for diagnostics. |
Definition at line 833 of file MPTInvariant.cpp.
|
nodiscardprivate |
Check whether a holder is authorized to send or receive an MPToken.
Deleted MPToken SLEs are no longer present in the view by the time finalize() runs, so their authorization state is captured during visitEntry() and stored in deletedAuthorized_. For deleted MPTokens, returns true if reqAuth is false or lsfMPTAuthorized was set at deletion. For existing MPTokens, returns the result of requireAuth().
| view | The ledger view after transaction application. |
| mptid | The MPToken issuance ID. |
| holder | The holder account being checked. |
| requireAuth | Whether the issuance requires explicit authorization. |
Definition at line 810 of file MPTInvariant.cpp.
Definition at line 200 of file MPTInvariant.h.
Definition at line 203 of file MPTInvariant.h.