20#include <xrpld/app/tx/detail/DeleteOracle.h>
21#include <xrpld/ledger/View.h>
22#include <xrpl/protocol/Feature.h>
23#include <xrpl/protocol/Rules.h>
24#include <xrpl/protocol/TxFlags.h>
39 JLOG(ctx.
j.
debug()) <<
"Oracle Delete: invalid flags.";
56 JLOG(ctx.
j.
debug()) <<
"Oracle Delete: Oracle does not exist.";
59 else if (ctx.
tx.
getAccountID(sfAccount) != sle->getAccountID(sfOwner))
63 JLOG(ctx.
j.
debug()) <<
"Oracle Delete: invalid account.";
84 JLOG(j.
fatal()) <<
"Unable to delete Oracle from owner.";
94 sle->getFieldArray(sfPriceDataSeries).size() > 5 ? -2 : -1;
A generic endpoint for log messages.
Writeable view to a ledger, for applying a transaction.
bool dirRemove(Keylet const &directory, std::uint64_t page, uint256 const &key, bool keepRoot)
Remove an entry from a directory.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
static TER deleteOracle(ApplyView &view, std::shared_ptr< SLE > const &sle, AccountID const &account, beast::Journal j)
static NotTEC preflight(PreflightContext const &ctx)
static TER preclaim(PreclaimContext const &ctx)
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
AccountID getAccountID(SField const &field) const
std::uint32_t getFlags() const
Keylet oracle(AccountID const &account, std::uint32_t const &documentID) noexcept
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
NotTEC preflight1(PreflightContext const &ctx)
Performs early sanity checks on the account and fee fields.
static bool adjustOwnerCount(ApplyContext &ctx, int count)
NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
constexpr std::uint32_t tfUniversalMask
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.