rippled
Loading...
Searching...
No Matches
directory.h
1#ifndef XRPL_TEST_JTX_DIRECTORY_H_INCLUDED
2#define XRPL_TEST_JTX_DIRECTORY_H_INCLUDED
3
4#include <test/jtx/Env.h>
5
6#include <xrpl/basics/Expected.h>
7#include <xrpl/protocol/Feature.h>
8#include <xrpl/protocol/Indexes.h>
9
10#include <cstdint>
11#include <limits>
12
13namespace ripple::test::jtx {
14
16namespace directory {
17
26
35auto
37 Env& env,
38 std::uint64_t newLastPage,
39 Keylet directory,
42
47bool
49
50inline auto
52{
53 if (env.enabled(fixDirectoryLimit))
55 return dirNodeMaxPages - 1;
56}
57
58} // namespace directory
59
60} // namespace ripple::test::jtx
61
62#endif
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:124
A transaction testing environment.
Definition Env.h:102
bool enabled(uint256 feature) const
Definition Env.h:619
T max(T... args)
auto bumpLastPage(Env &env, std::uint64_t newLastPage, Keylet directory, std::function< bool(ApplyView &, uint256, std::uint64_t)> adjust) -> Expected< void, Error >
Move the position of the last page in the user's directory on open ledger to newLastPage.
Definition directory.cpp:11
auto maximumPageIndex(Env const &env) -> std::uint64_t
Definition directory.h:51
bool adjustOwnerNode(ApplyView &view, uint256 key, std::uint64_t page)
Implementation of adjust for the most common ledger entry, i.e.
std::uint64_t constexpr dirNodeMaxPages
The maximum number of pages allowed in a directory.
Definition Protocol.h:43
A pair of SHAMap key and LedgerEntryType.
Definition Keylet.h:20