rippled
Loading...
Searching...
No Matches
directory.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <xrpl/basics/Expected.h>
6#include <xrpl/protocol/Feature.h>
7#include <xrpl/protocol/Indexes.h>
8
9#include <cstdint>
10#include <limits>
11
12namespace xrpl::test::jtx {
13
15namespace directory {
16
25
34auto
36 Env& env,
37 std::uint64_t newLastPage,
38 Keylet directory,
40
45bool
47
48inline auto
50{
51 if (env.enabled(fixDirectoryLimit))
53 return dirNodeMaxPages - 1;
54}
55
56} // namespace directory
57
58} // namespace xrpl::test::jtx
Writeable view to a ledger, for applying a transaction.
Definition ApplyView.h:114
A transaction testing environment.
Definition Env.h:119
bool enabled(uint256 feature) const
Definition Env.h:643
T max(T... args)
auto maximumPageIndex(Env const &env) -> std::uint64_t
Definition directory.h:49
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
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:19