20 #ifndef RIPPLE_LEDGER_PAYMENTSANDBOX_H_INCLUDED
21 #define RIPPLE_LEDGER_PAYMENTSANDBOX_H_INCLUDED
23 #include <ripple/ledger/RawView.h>
24 #include <ripple/ledger/Sandbox.h>
25 #include <ripple/ledger/detail/ApplyViewBase.h>
26 #include <ripple/protocol/AccountID.h>
63 STAmount const& preCreditSenderBalance);
82 explicit Value() =
default;
162 STAmount const& amount)
const override;
169 STAmount const& preCreditBalance)
override;
XRPAmount xrpDestroyed() const
PaymentSandbox(ApplyView const *base)
A wrapper which makes credits unavailable to balances.
std::optional< Adjustment > adjustments(AccountID const &main, AccountID const &other, Currency const ¤cy) const
PaymentSandbox(PaymentSandbox *base)
void adjustOwnerCountHook(AccountID const &account, std::uint32_t cur, std::uint32_t next) override
std::map< std::tuple< AccountID, AccountID, Currency >, STAmount > balanceChanges(ReadView const &view) const
std::map< Key, Value > credits_
Writeable view to a ledger, for applying a transaction.
void credit(AccountID const &sender, AccountID const &receiver, STAmount const &amount, STAmount const &preCreditSenderBalance)
Interface for ledger entry changes.
PaymentSandbox const * ps_
void apply(DeferredCredits &to)
PaymentSandbox(PaymentSandbox const *base)
Construct on top of existing PaymentSandbox.
detail::DeferredCredits tab_
ApplyFlags flags() const override
Returns the tx apply flags.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
void apply(RawView &to)
Apply changes to base view.
Adjustment(STAmount const &d, STAmount const &c, STAmount const &b)
void ownerCount(AccountID const &id, std::uint32_t cur, std::uint32_t next)
PaymentSandbox & operator=(PaymentSandbox &&)=delete
STAmount lowAcctOrigBalance
PaymentSandbox(ReadView const *base, ApplyFlags flags)
static Key makeKey(AccountID const &a1, AccountID const &a2, Currency const &c)
std::uint32_t ownerCountHook(AccountID const &account, std::uint32_t count) const override
void creditHook(AccountID const &from, AccountID const &to, STAmount const &amount, STAmount const &preCreditBalance) override
std::map< AccountID, std::uint32_t > ownerCounts_
STAmount balanceHook(AccountID const &account, AccountID const &issuer, STAmount const &amount) const override