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

Invariant: Validates several invariants for NFToken pages. More...

#include <NFTInvariant.h>

Public Member Functions

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

Private Attributes

bool badEntry_ = false
bool badLink_ = false
bool badSort_ = false
bool badURI_ = false
bool invalidSize_ = false
bool deletedFinalPage_ = false
bool deletedLink_ = false

Detailed Description

Invariant: Validates several invariants for NFToken pages.

The following checks are made:

  • The page is correctly associated with the owner.
  • The page is correctly ordered between the next and previous links.
  • The page contains at least one and no more than 32 NFTokens.
  • The NFTokens on this page do not belong on a lower or higher page.
  • The NFTokens are correctly sorted on the page.
  • Each URI, if present, is not empty.

Definition at line 24 of file NFTInvariant.h.

Member Function Documentation

◆ visitEntry()

void xrpl::ValidNFTokenPage::visitEntry ( bool isDelete,
SLE::const_ref before,
SLE::const_ref after )

Definition at line 28 of file NFTInvariant.cpp.

◆ finalize()

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

Definition at line 129 of file NFTInvariant.cpp.

Member Data Documentation

◆ badEntry_

bool xrpl::ValidNFTokenPage::badEntry_ = false
private

Definition at line 26 of file NFTInvariant.h.

◆ badLink_

bool xrpl::ValidNFTokenPage::badLink_ = false
private

Definition at line 27 of file NFTInvariant.h.

◆ badSort_

bool xrpl::ValidNFTokenPage::badSort_ = false
private

Definition at line 28 of file NFTInvariant.h.

◆ badURI_

bool xrpl::ValidNFTokenPage::badURI_ = false
private

Definition at line 29 of file NFTInvariant.h.

◆ invalidSize_

bool xrpl::ValidNFTokenPage::invalidSize_ = false
private

Definition at line 30 of file NFTInvariant.h.

◆ deletedFinalPage_

bool xrpl::ValidNFTokenPage::deletedFinalPage_ = false
private

Definition at line 31 of file NFTInvariant.h.

◆ deletedLink_

bool xrpl::ValidNFTokenPage::deletedLink_ = false
private

Definition at line 32 of file NFTInvariant.h.