3#include <xrpl/basics/base_uint.h>
4#include <xrpl/basics/chrono.h>
5#include <xrpl/beast/utility/Journal.h>
6#include <xrpl/ledger/ApplyView.h>
7#include <xrpl/ledger/ReadView.h>
8#include <xrpl/protocol/AccountID.h>
9#include <xrpl/protocol/Asset.h>
10#include <xrpl/protocol/Keylet.h>
11#include <xrpl/protocol/LedgerFormats.h>
12#include <xrpl/protocol/MPTIssue.h>
13#include <xrpl/protocol/Protocol.h>
14#include <xrpl/protocol/SField.h>
15#include <xrpl/protocol/STAmount.h>
16#include <xrpl/protocol/STLedgerEntry.h>
17#include <xrpl/protocol/STTx.h>
18#include <xrpl/protocol/TER.h>
19#include <xrpl/protocol/XRPAmount.h>
78 MPTIssue
const& mptShare,
126 return (requested + 255) & (~255);
137 ReadView
const& validLedger,
138 ReadView
const& testLedger,
146 ReadView
const& testLedger,
180 ReadView
const& view,
184 STAmount
const& amount,
185 bool hasDestinationTag);
204 ReadView
const& view,
207 STAmount
const& amount,
208 bool hasDestinationTag);
230 ApplyViewContext ctx,
234 XRPAmount priorBalance,
235 STAmount
const& amount,
256 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.
bool hasExpired(ReadView const &view, std::optional< std::uint32_t > const &exp, ExpiryComparison comparison=ExpiryComparison::Inclusive)
Determines whether the given expiration time has passed.
TypedField< STInteger< std::uint64_t > > SF_UINT64
std::set< uint256 > getEnabledAmendments(ReadView const &view)
std::uint32_t LedgerIndex
A ledger index.
ExpiryComparison
Whether an expiration check should be inclusive or exclusive.
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.
@ Yes
We have consensus along with the network.
@ No
We do not have consensus.
TER doWithdraw(ApplyViewContext ctx, AccountID const &senderAcct, AccountID const &dstAcct, AccountID const &sourceAcct, XRPAmount priorBalance, STAmount const &amount, beast::Journal j)
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.