1#include <xrpld/app/tx/detail/DeleteOracle.h>
3#include <xrpl/ledger/View.h>
4#include <xrpl/protocol/Feature.h>
5#include <xrpl/protocol/Rules.h>
6#include <xrpl/protocol/TxFlags.h>
26 JLOG(ctx.
j.
debug()) <<
"Oracle Delete: Oracle does not exist.";
29 else if (ctx.
tx.
getAccountID(sfAccount) != sle->getAccountID(sfOwner))
33 JLOG(ctx.
j.
debug()) <<
"Oracle Delete: invalid account.";
54 JLOG(j.
fatal()) <<
"Unable to delete Oracle from owner.";
64 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.
AccountID getAccountID(SField const &field) 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.
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
TERSubset< CanCvtToNotTEC > NotTEC
State information when determining if a tx is likely to claim a fee.
State information when preflighting a tx.