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