|
xrpld
|
#include <MPTInvariant.h>

Public Member Functions | |
| void | visitEntry (bool isDelete, SLE::ConstRef before, SLE::ConstRef after) |
| Track MPT issuance and holding creations, deletions, and mutations. | |
| bool | finalize (STTx const &tx, TER const result, XRPAmount const fee, ReadView const &view, beast::Journal const &j) const |
| Verify MPT issuance invariants after transaction application. | |
Private Attributes | |
| std::uint32_t | mptIssuancesCreated_ = 0 |
| std::uint32_t | mptIssuancesDeleted_ = 0 |
| std::uint32_t | mptokensCreated_ = 0 |
| std::uint32_t | mptokensDeleted_ = 0 |
| bool | mptCreatedByIssuer_ = false |
| bool | referenceHoldingSetOnCreate_ = false |
| sfReferenceHolding is intended to be set exactly once at vault creation and immutable thereafter; true when that rule was violated. | |
| bool | referenceHoldingMutated_ = false |
| True when sfReferenceHolding was mutated on an existing MPTokenIssuance. | |
| std::uint32_t | issuanceFlagsCleared_ = 0 |
| Flags cleared on an existing MPTokenIssuance, except lsfMPTLocked, which tfMPTUnlock clears legitimately. | |
| std::vector< std::shared_ptr< SLE const > > | deletedHoldings_ |
| MPTokens and RippleStates deleted during apply. | |
Definition at line 23 of file MPTInvariant.h.
| void xrpl::ValidMPTIssuance::visitEntry | ( | bool | isDelete, |
| SLE::ConstRef | before, | ||
| SLE::ConstRef | after ) |
Track MPT issuance and holding creations, deletions, and mutations.
| 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 71 of file MPTInvariant.cpp.
|
nodiscard |
Verify MPT issuance invariants after transaction application.
| 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 141 of file MPTInvariant.cpp.
|
private |
Definition at line 25 of file MPTInvariant.h.
|
private |
Definition at line 26 of file MPTInvariant.h.
|
private |
Definition at line 28 of file MPTInvariant.h.
|
private |
Definition at line 29 of file MPTInvariant.h.
|
private |
Definition at line 32 of file MPTInvariant.h.
|
private |
sfReferenceHolding is intended to be set exactly once at vault creation and immutable thereafter; true when that rule was violated.
Definition at line 38 of file MPTInvariant.h.
|
private |
True when sfReferenceHolding was mutated on an existing MPTokenIssuance.
Definition at line 43 of file MPTInvariant.h.
|
private |
Flags cleared on an existing MPTokenIssuance, except lsfMPTLocked, which tfMPTUnlock clears legitimately.
Every other issuance flag is fixed at creation or set-once via MPTokenIssuanceSet, so any bit accumulated here is a bug. Enforced post-fixCleanup3_5_0.
Definition at line 51 of file MPTInvariant.h.
|
private |
MPTokens and RippleStates deleted during apply.
finalize() checks each holder's AccountRoot to detect vault pseudo-account holdings deleted outside VaultDelete. All these checks are gated on fixCleanup3_2_0.
Under fixCleanup3_5_0, finalize() also rejects any MPToken erased with a non-zero sfMPTAmount.
Definition at line 61 of file MPTInvariant.h.