rippled
Loading...
Searching...
No Matches
owners.h
1#pragma once
2
3#include <test/jtx/Env.h>
4
5#include <xrpl/ledger/ReadView.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
20 test::jtx::Env& env,
21 AccountID const& id,
22 LedgerEntryType type,
23 std::uint32_t value);
24
25} // namespace detail
26
27namespace test {
28namespace jtx {
29
30// Helper for aliases
31template <LedgerEntryType Type>
33{
34private:
37
38public:
39 owner_count(Account const& account, std::uint32_t value) : account_(account), value_(value)
40 {
41 }
42
43 void
44 operator()(Env& env) const
45 {
47 }
48};
49
51class owners
52{
53private:
56
57public:
58 owners(Account const& account, std::uint32_t value) : account_(account), value_(value)
59 {
60 }
61
62 void
63 operator()(Env& env) const;
64};
65
68
71
72} // namespace jtx
73} // namespace test
74} // 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:122
void operator()(Env &env) const
Definition owners.h:44
owner_count(Account const &account, std::uint32_t value)
Definition owners.h:39
Match the number of items in the account's owner directory.
Definition owners.h:52
owners(Account const &account, std::uint32_t value)
Definition owners.h:58
std::uint32_t value_
Definition owners.h:55
void operator()(Env &env) const
Definition owners.cpp:35
std::uint32_t owned_count_of(ReadView const &view, AccountID const &id, LedgerEntryType type)
Definition owners.cpp:9
void owned_count_helper(test::jtx::Env &env, AccountID const &id, LedgerEntryType type, std::uint32_t value)
Definition owners.cpp:20
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.