1#include <xrpl/ledger/helpers/OfferHelpers.h>
3#include <xrpl/ledger/helpers/AccountRootHelpers.h>
4#include <xrpl/protocol/Indexes.h>
5#include <xrpl/protocol/LedgerFormats.h>
6#include <xrpl/protocol/st.h>
15 auto offerIndex = sle->key();
16 auto owner = sle->getAccountID(sfAccount);
19 uint256 const uDirectory = sle->getFieldH256(sfBookDirectory);
31 if (sle->isFieldPresent(sfAdditionalBooks))
34 sle->isFlag(lsfHybrid) && sle->isFieldPresent(sfDomainID),
35 "xrpl::offerDelete : should be a hybrid domain offer");
37 auto const& additionalBookDirs = sle->getFieldArray(sfAdditionalBooks);
39 for (
auto const& bookDir : additionalBookDirs)
41 auto const& dirIndex = bookDir.getFieldH256(sfBookDirectory);
42 auto const& dirNode = bookDir.getFieldU64(sfBookNode);
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 void erase(std::shared_ptr< SLE > const &sle)=0
Remove a peeked SLE.
virtual std::shared_ptr< SLE > peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet page(uint256 const &root, std::uint64_t index=0) noexcept
A page in a directory.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
TERSubset< CanCvtToTER > TER
void adjustOwnerCount(ApplyView &view, std::shared_ptr< SLE > const &sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
TER offerDelete(ApplyView &view, std::shared_ptr< SLE > const &sle, beast::Journal j)
Delete an offer.