diff --git a/include/xrpl/ledger/helpers/EscrowHelpers.h b/include/xrpl/ledger/helpers/EscrowHelpers.h index a80a290b84..533daa0cf2 100644 --- a/include/xrpl/ledger/helpers/EscrowHelpers.h +++ b/include/xrpl/ledger/helpers/EscrowHelpers.h @@ -17,7 +17,7 @@ namespace xrpl { template TER escrowUnlockApplyHelper( - ApplyViewContext ctx, + ApplyViewContext& ctx, Rate lockedRate, SLE::ref sleDest, STAmount const& xrpBalance, @@ -31,7 +31,7 @@ escrowUnlockApplyHelper( template <> inline TER escrowUnlockApplyHelper( - ApplyViewContext ctx, + ApplyViewContext& ctx, Rate lockedRate, SLE::ref sleDest, STAmount const& xrpBalance, @@ -168,7 +168,7 @@ escrowUnlockApplyHelper( template <> inline TER escrowUnlockApplyHelper( - ApplyViewContext ctx, + ApplyViewContext& ctx, Rate lockedRate, SLE::ref sleDest, STAmount const& xrpBalance, diff --git a/include/xrpl/ledger/helpers/MPTokenHelpers.h b/include/xrpl/ledger/helpers/MPTokenHelpers.h index a609c47f99..cbdffdfc91 100644 --- a/include/xrpl/ledger/helpers/MPTokenHelpers.h +++ b/include/xrpl/ledger/helpers/MPTokenHelpers.h @@ -71,7 +71,7 @@ canAddHolding(ReadView const& view, MPTIssue const& mptIssue); [[nodiscard]] TER authorizeMPToken( - ApplyViewContext ctx, + ApplyViewContext& ctx, XRPAmount const& priorBalance, MPTID const& mptIssuanceID, AccountID const& account, @@ -102,7 +102,7 @@ requireAuth( */ [[nodiscard]] TER enforceMPTokenAuthorization( - ApplyViewContext ctx, + ApplyViewContext& ctx, MPTID const& mptIssuanceID, AccountID const& account, XRPAmount const& priorBalance, @@ -188,7 +188,7 @@ canMPTTradeAndTransfer( [[nodiscard]] TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, MPTIssue const& mptIssue, @@ -196,7 +196,7 @@ addEmptyHolding( [[nodiscard]] TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, MPTIssue const& mptIssue, beast::Journal journal); diff --git a/include/xrpl/ledger/helpers/RippleStateHelpers.h b/include/xrpl/ledger/helpers/RippleStateHelpers.h index 53c843ec1d..3cd5b79eee 100644 --- a/include/xrpl/ledger/helpers/RippleStateHelpers.h +++ b/include/xrpl/ledger/helpers/RippleStateHelpers.h @@ -229,7 +229,7 @@ canTransfer(ReadView const& view, Issue const& issue, AccountID const& from, Acc /// canAddHolding() in preflight with the same View and Asset [[nodiscard]] TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, Issue const& issue, @@ -237,7 +237,7 @@ addEmptyHolding( [[nodiscard]] TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, Issue const& issue, beast::Journal journal); diff --git a/include/xrpl/ledger/helpers/SponsorHelpers.h b/include/xrpl/ledger/helpers/SponsorHelpers.h index be73b3252c..e1696c7a9b 100644 --- a/include/xrpl/ledger/helpers/SponsorHelpers.h +++ b/include/xrpl/ledger/helpers/SponsorHelpers.h @@ -35,7 +35,7 @@ getTxReserveSponsorAccountID(STTx const& tx) } inline std::expected -getTxReserveSponsor(ApplyViewContext ctx) +getTxReserveSponsor(ApplyViewContext& ctx) { auto const sponsorID = getTxReserveSponsorAccountID(ctx.tx); if (sponsorID) diff --git a/include/xrpl/ledger/helpers/TokenHelpers.h b/include/xrpl/ledger/helpers/TokenHelpers.h index c8c42a8c80..70d4ecab58 100644 --- a/include/xrpl/ledger/helpers/TokenHelpers.h +++ b/include/xrpl/ledger/helpers/TokenHelpers.h @@ -230,7 +230,7 @@ canAddHolding(ReadView const& view, Asset const& asset); [[nodiscard]] TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, Asset const& asset, @@ -238,7 +238,7 @@ addEmptyHolding( [[nodiscard]] TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, Asset const& asset, beast::Journal journal); diff --git a/include/xrpl/tx/transactors/token/MPTokenIssuanceCreate.h b/include/xrpl/tx/transactors/token/MPTokenIssuanceCreate.h index 8d4cea1542..0b3acb5d79 100644 --- a/include/xrpl/tx/transactors/token/MPTokenIssuanceCreate.h +++ b/include/xrpl/tx/transactors/token/MPTokenIssuanceCreate.h @@ -63,7 +63,7 @@ public: beast::Journal const& j) override; static std::expected - create(ApplyViewContext ctx, beast::Journal journal, MPTCreateArgs const& args); + create(ApplyViewContext& ctx, beast::Journal journal, MPTCreateArgs const& args); }; } // namespace xrpl diff --git a/src/libxrpl/ledger/View.cpp b/src/libxrpl/ledger/View.cpp index de3994ec88..51b0fcdb4c 100644 --- a/src/libxrpl/ledger/View.cpp +++ b/src/libxrpl/ledger/View.cpp @@ -432,7 +432,7 @@ canWithdraw(ReadView const& view, STTx const& tx) TER doWithdraw( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& senderAcct, AccountID const& dstAcct, AccountID const& sourceAcct, diff --git a/src/libxrpl/ledger/helpers/MPTokenHelpers.cpp b/src/libxrpl/ledger/helpers/MPTokenHelpers.cpp index a32b6c74da..00490badcf 100644 --- a/src/libxrpl/ledger/helpers/MPTokenHelpers.cpp +++ b/src/libxrpl/ledger/helpers/MPTokenHelpers.cpp @@ -125,7 +125,7 @@ canAddHolding(ReadView const& view, MPTIssue const& mptIssue) [[nodiscard]] TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, MPTIssue const& mptIssue, @@ -148,7 +148,7 @@ addEmptyHolding( [[nodiscard]] TER authorizeMPToken( - ApplyViewContext ctx, + ApplyViewContext& ctx, XRPAmount const& priorBalance, MPTID const& mptIssuanceID, AccountID const& account, @@ -279,7 +279,7 @@ authorizeMPToken( [[nodiscard]] TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, MPTIssue const& mptIssue, beast::Journal journal) @@ -411,7 +411,7 @@ requireAuth( [[nodiscard]] TER enforceMPTokenAuthorization( - ApplyViewContext ctx, + ApplyViewContext& ctx, MPTID const& mptIssuanceID, AccountID const& account, XRPAmount const& priorBalance, // for MPToken authorization diff --git a/src/libxrpl/ledger/helpers/RippleStateHelpers.cpp b/src/libxrpl/ledger/helpers/RippleStateHelpers.cpp index fb61815858..02b5cf4a84 100644 --- a/src/libxrpl/ledger/helpers/RippleStateHelpers.cpp +++ b/src/libxrpl/ledger/helpers/RippleStateHelpers.cpp @@ -633,7 +633,7 @@ canTransfer(ReadView const& view, Issue const& issue, AccountID const& from, Acc TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, Issue const& issue, @@ -699,7 +699,7 @@ addEmptyHolding( TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, Issue const& issue, beast::Journal journal) diff --git a/src/libxrpl/ledger/helpers/TokenHelpers.cpp b/src/libxrpl/ledger/helpers/TokenHelpers.cpp index 2cf27c1fce..482f62d468 100644 --- a/src/libxrpl/ledger/helpers/TokenHelpers.cpp +++ b/src/libxrpl/ledger/helpers/TokenHelpers.cpp @@ -473,7 +473,7 @@ canAddHolding(ReadView const& view, Asset const& asset) TER addEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, XRPAmount priorBalance, Asset const& asset, @@ -488,7 +488,7 @@ addEmptyHolding( TER removeEmptyHolding( - ApplyViewContext ctx, + ApplyViewContext& ctx, AccountID const& accountID, Asset const& asset, beast::Journal journal) diff --git a/src/libxrpl/tx/transactors/token/MPTokenIssuanceCreate.cpp b/src/libxrpl/tx/transactors/token/MPTokenIssuanceCreate.cpp index f669b1af45..3e5a903b05 100644 --- a/src/libxrpl/tx/transactors/token/MPTokenIssuanceCreate.cpp +++ b/src/libxrpl/tx/transactors/token/MPTokenIssuanceCreate.cpp @@ -104,7 +104,7 @@ MPTokenIssuanceCreate::preflight(PreflightContext const& ctx) std::expected MPTokenIssuanceCreate::create( - ApplyViewContext ctx, + ApplyViewContext& ctx, beast::Journal journal, MPTCreateArgs const& args) {