3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/ApplyView.h>
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/protocol/MPTIssue.h>
7#include <xrpl/protocol/Protocol.h>
8#include <xrpl/protocol/STLedgerEntry.h>
9#include <xrpl/protocol/STTx.h>
10#include <xrpl/protocol/TER.h>
58 MPTIssue
const& mptShare,
104 return (requested + 255) & (~255);
114 ReadView
const& validLedger,
115 ReadView
const& testLedger,
123 ReadView
const& testLedger,
156 ReadView
const& view,
160 STAmount
const& amount,
161 bool hasDestinationTag);
179 ReadView
const& view,
182 STAmount
const& amount,
183 bool hasDestinationTag);
209 XRPAmount priorBalance,
210 STAmount
const& amount,
229 Keylet const& ownerDirKeylet,
Provide a light-weight way to check active() before string formatting.
A generic endpoint for log messages.
Writeable view to a ledger, for applying a transaction.
std::chrono::time_point< NetClock > time_point
std::shared_ptr< STLedgerEntry > pointer
std::shared_ptr< STLedgerEntry const > const & const_ref
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
TypedField< STInteger< std::uint64_t > > SF_UINT64
std::set< uint256 > getEnabledAmendments(ReadView const &view)
std::uint32_t LedgerIndex
A ledger index.
TER doWithdraw(ApplyView &view, STTx const &tx, AccountID const &senderAcct, AccountID const &dstAcct, AccountID const &sourceAcct, XRPAmount priorBalance, STAmount const &amount, beast::Journal j)
bool hasExpired(ReadView const &view, std::optional< std::uint32_t > const &exp)
Determines whether the given expiration time has passed.
bool isVaultPseudoAccountFrozen(ReadView const &view, AccountID const &account, MPTIssue const &mptShare, std::uint8_t depth)
bool areCompatible(ReadView const &validLedger, ReadView const &testLedger, beast::Journal::Stream &s, char const *reason)
Return false if the test ledger is provably incompatible with the valid ledger, that is,...
LedgerIndex getCandidateLedger(LedgerIndex requested)
Find a ledger index from which we could easily get the requested ledger.
std::optional< uint256 > hashOfSeq(ReadView const &ledger, LedgerIndex seq, beast::Journal journal)
Return the hash of a ledger by sequence.
TER dirLink(ApplyView &view, AccountID const &owner, SLE::pointer &object, SF_UINT64 const &node=sfOwnerNode)
majorityAmendments_t getMajorityAmendments(ReadView const &view)
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
std::map< uint256, NetClock::time_point > majorityAmendments_t
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
TERSubset< CanCvtToTER > TER
bool isLPTokenFrozen(ReadView const &view, AccountID const &account, Asset const &asset, Asset const &asset2)
std::function< std::pair< TER, SkipEntry >(LedgerEntryType, uint256 const &, SLE::pointer &)> EntryDeleter
Deleter function prototype.
LedgerEntryType
Identifiers for on-ledger objects.
TER canWithdraw(ReadView const &view, AccountID const &from, AccountID const &to, SLE::const_ref toSle, STAmount const &amount, bool hasDestinationTag)
Checks that can withdraw funds from an object to itself or a destination.
TER cleanupOnAccountDelete(ApplyView &view, Keylet const &ownerDirKeylet, EntryDeleter const &deleter, beast::Journal j, std::optional< std::uint16_t > maxNodesToDelete=std::nullopt)
Cleanup owner directory entries on account delete.
A pair of SHAMap key and LedgerEntryType.