rippled
Loading...
Searching...
No Matches
owners.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <xrpl/ledger/View.h>
6#include <xrpl/protocol/LedgerFormats.h>
7#include <xrpl/protocol/UintTypes.h>
8
9#include <cstdint>
10
11namespace xrpl {
12
13namespace detail {
14
16owned_count_of(ReadView const& view, AccountID const& id, LedgerEntryType type);
17
18void
19owned_count_helper(test::jtx::Env& env, AccountID const& id, LedgerEntryType type, std::uint32_t value);
20
21} // namespace detail
22
23namespace test {
24namespace jtx {
25
26// Helper for aliases
27template <LedgerEntryType Type>
29{
30private:
33
34public:
35 owner_count(Account const& account, std::uint32_t value) : account_(account), value_(value)
36 {
37 }
38
39 void
40 operator()(Env& env) const
41 {
43 }
44};
45
47class owners
48{
49private:
52
53public:
54 owners(Account const& account, std::uint32_t value) : account_(account), value_(value)
55 {
56 }
57
58 void
59 operator()(Env& env) const;
60};
61
64
67
68} // namespace jtx
69} // namespace test
70} // namespace xrpl
Immutable cryptographic account descriptor.
Definition Account.h:19
AccountID id() const
Returns the Account ID.
Definition Account.h:87
A transaction testing environment.
Definition Env.h:119
void operator()(Env &env) const
Definition owners.h:40
owner_count(Account const &account, std::uint32_t value)
Definition owners.h:35
Match the number of items in the account's owner directory.
Definition owners.h:48
owners(Account const &account, std::uint32_t value)
Definition owners.h:54
std::uint32_t value_
Definition owners.h:51
void operator()(Env &env) const
Definition owners.cpp:29
std::uint32_t owned_count_of(ReadView const &view, AccountID const &id, LedgerEntryType type)
Definition owners.cpp:7
void owned_count_helper(test::jtx::Env &env, AccountID const &id, LedgerEntryType type, std::uint32_t value)
Definition owners.cpp:18
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:28
LedgerEntryType
Identifiers for on-ledger objects.