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