xrpld
Loading...
Searching...
No Matches
directory.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <xrpl/protocol/Feature.h>
6#include <xrpl/protocol/Indexes.h>
7
8#include <cstdint>
9#include <expected>
10#include <limits>
11
14
23
32auto
34 Env& env,
35 std::uint64_t newLastPage,
37 std::function<bool(ApplyView&, uint256, std::uint64_t)> adjust) -> std::expected<void, Error>;
38
43bool
45
46inline auto
48{
49 if (env.enabled(fixDirectoryLimit))
51 return kDirNodeMaxPages - 1;
52}
53
54} // namespace xrpl::test::jtx::directory
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:118
A transaction testing environment.
Definition Env.h:143
bool enabled(uint256 feature) const
Definition Env.h:715
T max(T... args)
Directory operations.
Definition directory.h:13
auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> std::expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
Definition directory.cpp:25
auto maximumPageIndex(Env const &env) -> std::uint64_t
Definition directory.h:47
bool adjustOwnerNode(ApplyView &view, uint256 key, std::uint64_t page)
Implementation of adjust for the most common ledger entry, i.e.
constexpr std::uint64_t kDirNodeMaxPages
The maximum number of pages allowed in a directory.
Definition Protocol.h:47
BaseUInt< 256 > uint256
Definition base_uint.h:562
A pair of SHAMap key and LedgerEntryType.
Definition Keylet.h:19