Optimize MPT freeze checks to reduce redundant state reads

This commit is contained in:
Gregory Tsipenyuk
2026-06-05 06:51:37 -04:00
parent 6c543426c3
commit df0ed95383
7 changed files with 181 additions and 17 deletions

View File

@@ -58,6 +58,13 @@ isVaultPseudoAccountFrozen(
MPTIssue const& mptShare,
std::uint8_t depth);
[[nodiscard]] bool
isVaultPseudoAccountFrozen(
ReadView const& view,
AccountID const& account,
SLE const& issuanceSle,
std::uint8_t depth);
[[nodiscard]] bool
isLPTokenFrozen(
ReadView const& view,

View File

@@ -23,9 +23,15 @@ namespace xrpl {
[[nodiscard]] bool
isGlobalFrozen(ReadView const& view, MPTIssue const& mptIssue);
[[nodiscard]] bool
isGlobalFrozen(SLE const& issuanceSle);
[[nodiscard]] bool
isIndividualFrozen(ReadView const& view, AccountID const& account, MPTIssue const& mptIssue);
[[nodiscard]] bool
isIndividualFrozen(SLE const& mptSle);
[[nodiscard]] bool
isFrozen(
ReadView const& view,
@@ -33,6 +39,9 @@ isFrozen(
MPTIssue const& mptIssue,
std::uint8_t depth = 0);
[[nodiscard]] bool
isFrozen(ReadView const& view, AccountID const& account, SLE const& mptSle, std::uint8_t depth = 0);
[[nodiscard]] bool
isAnyFrozen(
ReadView const& view,