diff --git a/AMMExtended__test_8cpp_source.html b/AMMExtended__test_8cpp_source.html index f155f79ac6..5b07463c9d 100644 --- a/AMMExtended__test_8cpp_source.html +++ b/AMMExtended__test_8cpp_source.html @@ -3995,7 +3995,7 @@ $(function() {
ripple::test::AMMExtended_test::testMultisign
void testMultisign()
Definition: AMMExtended_test.cpp:3868
ripple::test::AMMExtended_test::receive_max
void receive_max()
Definition: AMMExtended_test.cpp:1506
ripple::test::jtx::drops
PrettyAmount drops(Integer i)
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
Definition: amount.h:241
-
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:142
+
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:150
ripple::test::jtx::AMM::ammAccount
AccountID const & ammAccount() const
Definition: AMM.h:255
ripple::test::AMMExtended_test::testPayStrand
void testPayStrand()
Definition: AMMExtended_test.cpp:3880
ripple::test::jtx::ter
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition: ter.h:33
@@ -4070,7 +4070,7 @@ $(function() {
ripple::test::jtx::sendmax
Sets the SendMax on a JTx.
Definition: sendmax.h:31
ripple::test::jtx::AMMTest::reserve
XRPAmount reserve(jtx::Env &env, std::uint32_t count) const
Definition: AMMTest.cpp:147
ripple::test::AMMExtended_test::testToStrand
void testToStrand(FeatureBitset features)
Definition: AMMExtended_test.cpp:3652
-
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:133
+
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:141
ripple::test::jtx::fset
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
Definition: flags.cpp:28
ripple::test::jtx::expectOffers
bool expectOffers(Env &env, AccountID const &account, std::uint16_t size, std::vector< Amounts > const &toMatch)
Definition: TestHelpers.cpp:140
ripple::test::jtx::txflags
Set the flags on a JTx.
Definition: txflags.h:30
diff --git a/AMM__test_8cpp_source.html b/AMM__test_8cpp_source.html index 15b6b2566b..d5cb47528e 100644 --- a/AMM__test_8cpp_source.html +++ b/AMM__test_8cpp_source.html @@ -4912,7 +4912,7 @@ $(function() {
utility
ripple::test::AMM_test::testBid
void testBid()
Definition: AMM_test.cpp:2519
ripple::test::AMM_test::testAmendment
void testAmendment()
Definition: AMM_test.cpp:3681
-
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:142
+
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:150
ripple::temBAD_CURRENCY
@ temBAD_CURRENCY
Definition: TER.h:89
ripple::test::jtx::AMM::ammAccount
AccountID const & ammAccount() const
Definition: AMM.h:255
ripple::test::jtx::ter
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition: ter.h:33
diff --git a/Escrow__test_8cpp_source.html b/Escrow__test_8cpp_source.html index 2414195927..20a6cdcd99 100644 --- a/Escrow__test_8cpp_source.html +++ b/Escrow__test_8cpp_source.html @@ -1617,7 +1617,7 @@ $(function() {
ripple::test::jtx::finish
Json::Value finish(AccountID const &account, AccountID const &from, std::uint32_t seq)
Definition: TestHelpers.cpp:224
ripple::test::jtx::ter
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition: ter.h:33
ripple::test::jtx::Env::require
void require(Args const &... args)
Check a set of requirements.
Definition: Env.h:479
-
ripple::test::jtx::finish_time
Set the "FinishAfter" time tag on a JTx.
Definition: TestHelpers.h:253
+
ripple::test::jtx::finish_time
Set the "FinishAfter" time tag on a JTx.
Definition: TestHelpers.h:261
ripple::Slice
An immutable linear range of bytes.
Definition: Slice.h:44
ripple::test::Escrow_test::testEscrowWithTickets
void testEscrowWithTickets()
Definition: Escrow_test.cpp:1373
ripple::test::jtx::balance
A balance matches.
Definition: balance.h:38
@@ -1645,11 +1645,11 @@ $(function() {
ripple::test::jtx::Env::meta
std::shared_ptr< STObject const > meta()
Return metadata for the last JTx.
Definition: Env.cpp:374
ripple::keylet::escrow
Keylet escrow(AccountID const &src, std::uint32_t seq) noexcept
An escrow entry.
Definition: Indexes.cpp:327
ripple::test::Escrow_test::testTiming
void testTiming()
Definition: Escrow_test.cpp:102
-
ripple::test::jtx::fulfillment
Definition: TestHelpers.h:311
+
ripple::test::jtx::fulfillment
Definition: TestHelpers.h:319
ripple::test::jtx::fset
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
Definition: flags.cpp:28
ripple::tecUNFUNDED
@ tecUNFUNDED
Definition: TER.h:276
std::array< std::uint8_t, 4 >
-
ripple::test::jtx::cancel_time
Set the "CancelAfter" time tag on a JTx.
Definition: TestHelpers.h:271
+
ripple::test::jtx::cancel_time
Set the "CancelAfter" time tag on a JTx.
Definition: TestHelpers.h:279
ripple::test::jtx::Env::close
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
Definition: Env.cpp:121
ripple::test::Escrow_test::run
void run() override
Definition: Escrow_test.cpp:1512
ripple::temBAD_AMOUNT
@ temBAD_AMOUNT
Definition: TER.h:88
@@ -1663,7 +1663,7 @@ $(function() {
ripple::sfTransactionResult
const SF_UINT8 sfTransactionResult
ripple::test::jtx::Env::now
NetClock::time_point now()
Returns the current network time.
Definition: Env.h:265
ripple::test::Escrow_test::test1571
void test1571()
Definition: Escrow_test.cpp:304
-
ripple::test::jtx::condition
Definition: TestHelpers.h:288
+
ripple::test::jtx::condition
Definition: TestHelpers.h:296
ripple::test::Escrow_test::fb1
const std::array< std::uint8_t, 4 > fb1
Definition: Escrow_test.cpp:37
ripple::test::jtx::Env::fund
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Definition: Env.cpp:228
ripple::test::jtx::Env::le
std::shared_ptr< SLE const > le(Account const &account) const
Return an account root.
Definition: Env.cpp:216
diff --git a/Handler__test_8cpp_source.html b/Handler__test_8cpp_source.html index e4bb4a03e2..045808d9bf 100644 --- a/Handler__test_8cpp_source.html +++ b/Handler__test_8cpp_source.html @@ -171,7 +171,7 @@ $(function() {
100  std::ranlux48 prng(dev());
101 
102  std::vector<const char*> names =
-
103  test::jtx::make_vector(ripple::RPC::getHandlerNames());
+
103  test::jtx::make_vector(ripple::RPC::getHandlerNames());
104 
105  std::uniform_int_distribution<std::size_t> distr{0, names.size() - 1};
106 
@@ -228,6 +228,7 @@ $(function() {
limits
std::array::begin
T begin(T... args)
std::chrono::nanoseconds::count
T count(T... args)
+
ripple::test::jtx::make_vector
auto make_vector(Input const &input) requires requires(Input &v)
Definition: TestHelpers.h:42
ripple::test::operator<<
std::ostream & operator<<(std::ostream &os, std::chrono::nanoseconds ns)
Definition: Handler_test.cpp:37
std::size_t
std::array::end
T end(T... args)
diff --git a/Path__test_8cpp_source.html b/Path__test_8cpp_source.html index 54884a680a..b1b73e53a6 100644 --- a/Path__test_8cpp_source.html +++ b/Path__test_8cpp_source.html @@ -1472,7 +1472,7 @@ $(function() {
ripple::test::Path_test::gate
Definition: Path_test.cpp:95
std::string
STL class.
ripple::jtCLIENT
@ jtCLIENT
Definition: Job.h:45
-
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:142
+
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:150
ripple::sfGeneric
const SField sfGeneric(access, 0)
Definition: SField.h:356
ripple::test::jtx::ter
Set the expected result code for a JTx The test will fail if the code doesn't match.
Definition: ter.h:33
ripple::test::Path_test::gate::signaled_
bool signaled_
Definition: Path_test.cpp:100
@@ -1533,7 +1533,7 @@ $(function() {
ripple::test::jtx::sendmax
Sets the SendMax on a JTx.
Definition: sendmax.h:31
ripple::test::Path_test::path_find_06
void path_find_06()
Definition: Path_test.cpp:1118
std::unique_lock
STL class.
-
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:133
+
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:141
std::to_string
T to_string(T... args)
ripple::test::jtx::paths
Set Paths, SendMax on a JTx.
Definition: paths.h:32
ripple::test::jtx::Env::close
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
Definition: Env.cpp:121
diff --git a/PerfLog__test_8cpp_source.html b/PerfLog__test_8cpp_source.html index b2a8b79574..66295b2b59 100644 --- a/PerfLog__test_8cpp_source.html +++ b/PerfLog__test_8cpp_source.html @@ -382,7 +382,7 @@ $(function() {
311  // Get the all the labels we can use for RPC interfaces without
312  // causing an assert.
313  std::vector<char const*> labels =
-
314  test::jtx::make_vector(ripple::RPC::getHandlerNames());
+
314  test::jtx::make_vector(ripple::RPC::getHandlerNames());
315  std::shuffle(labels.begin(), labels.end(), default_prng());
316 
317  // Get two IDs to associate with each label. Errors tend to happen at
@@ -1209,6 +1209,7 @@ $(function() {
ripple::PerfLog_test::WithFile::yes
@ yes
std
STL namespace.
Json::Reader::parse
bool parse(std::string const &document, Value &root)
Read a Value from a JSON document.
Definition: json_reader.cpp:74
+
ripple::test::jtx::make_vector
auto make_vector(Input const &input) requires requires(Input &v)
Definition: TestHelpers.h:42
ripple::JobType
JobType
Definition: Job.h:35
ripple::PerfLog_test::testInvalidID
void testInvalidID(WithFile withFile)
Definition: PerfLog_test.cpp:852
std::vector::end
T end(T... args)
diff --git a/TestHelpers_8cpp_source.html b/TestHelpers_8cpp_source.html index 580bacfcb0..18baf1e007 100644 --- a/TestHelpers_8cpp_source.html +++ b/TestHelpers_8cpp_source.html @@ -100,7 +100,7 @@ $(function() {
29 
30 // Functions used in debugging
31 Json::Value
-
32 getAccountOffers(Env& env, AccountID const& acct, bool current)
+
32 getAccountOffers(Env& env, AccountID const& acct, bool current)
33 {
34  Json::Value jv;
35  jv[jss::account] = to_string(acct);
@@ -458,6 +458,7 @@ $(function() {
387 } // namespace test
388 } // namespace ripple
+
ripple::test::jtx::getAccountOffers
Json::Value getAccountOffers(Env &env, AccountID const &acct, bool current)
Definition: TestHelpers.cpp:32
ripple::sfOfferSequence
const SF_UINT32 sfOfferSequence
ripple::sfOwnerCount
const SF_UINT32 sfOwnerCount
ripple::STPath::push_back
void push_back(STPathElement const &e)
Definition: STPathSet.h:405
@@ -540,7 +541,6 @@ $(function() {
ripple::test::jtx::Account
Immutable cryptographic account descriptor.
Definition: Account.h:37
ripple::strHex
std::string strHex(FwdIt begin, FwdIt end)
Definition: strHex.h:30
ripple::tfUniversal
constexpr std::uint32_t tfUniversal
Definition: TxFlags.h:59
-
ripple::test::jtx::getAccountOffers
auto make_vector(auto const &input) requires std Json::Value getAccountOffers(Env &env, Account const &acct, bool current=false)
Definition: TestHelpers.h:48
ripple::STPath
Definition: STPathSet.h:118
ripple::test::jtx::expectLedgerEntryRoot
bool expectLedgerEntryRoot(Env &env, Account const &acct, STAmount const &expectedValue)
Definition: TestHelpers.cpp:200
ripple::sfPublicKey
const SF_VL sfPublicKey
diff --git a/TestHelpers_8h_source.html b/TestHelpers_8h_source.html index a37cb6a5a6..e8378eabe2 100644 --- a/TestHelpers_8h_source.html +++ b/TestHelpers_8h_source.html @@ -98,447 +98,456 @@ $(function() {
27 #include <ripple/protocol/jss.h>
28 #include <test/jtx/Env.h>
29 
-
30 #include <ranges>
+
30 #include <vector>
31 
32 namespace ripple {
33 namespace test {
34 namespace jtx {
35 
-
36 // Helper to make vector from iterable
-
37 auto
-
38 make_vector(auto const& input) requires std::ranges::range<decltype(input)>
-
39 {
-
40  return std::vector(std::ranges::begin(input), std::ranges::end(input));
-
41 }
-
42 
-
43 // Functions used in debugging
-
44 Json::Value
-
45 getAccountOffers(Env& env, AccountID const& acct, bool current = false);
-
46 
-
47 inline Json::Value
-
48 getAccountOffers(Env& env, Account const& acct, bool current = false)
-
49 {
-
50  return getAccountOffers(env, acct.id(), current);
-
51 }
-
52 
-
53 Json::Value
-
54 getAccountLines(Env& env, AccountID const& acctId);
-
55 
-
56 inline Json::Value
-
57 getAccountLines(Env& env, Account const& acct)
-
58 {
-
59  return getAccountLines(env, acct.id());
-
60 }
-
61 
-
62 template <typename... IOU>
-
63 Json::Value
-
64 getAccountLines(Env& env, AccountID const& acctId, IOU... ious)
-
65 {
-
66  auto const jrr = getAccountLines(env, acctId);
-
67  Json::Value res;
-
68  for (auto const& line : jrr[jss::lines])
-
69  {
-
70  for (auto const& iou : {ious...})
-
71  {
-
72  if (line[jss::currency].asString() == to_string(iou.currency))
-
73  {
-
74  Json::Value v;
-
75  v[jss::currency] = line[jss::currency];
-
76  v[jss::balance] = line[jss::balance];
-
77  v[jss::limit] = line[jss::limit];
-
78  v[jss::account] = line[jss::account];
-
79  res[jss::lines].append(v);
-
80  }
-
81  }
-
82  }
-
83  if (!res.isNull())
-
84  return res;
-
85  return jrr;
-
86 }
-
87 
-
88 [[nodiscard]] bool
-
89 checkArraySize(Json::Value const& val, unsigned int size);
-
90 
-
91 /* Path finding */
-
92 /******************************************************************************/
-
93 void
-
94 stpath_append_one(STPath& st, Account const& account);
+
36 // TODO We only need this long "requires" clause as polyfill, for C++20
+
37 // implementations which are missing <ranges> header. Replace with
+
38 // `std::ranges::range<Input>`, and accordingly use std::ranges::begin/end
+
39 // when we have moved to better compilers.
+
40 template <typename Input>
+
41 auto
+
42 make_vector(Input const& input) requires requires(Input& v)
+
43 {
+
44  std::begin(v);
+
45  std::end(v);
+
46 }
+
47 {
+
48  return std::vector(std::begin(input), std::end(input));
+
49 }
+
50 
+
51 // Functions used in debugging
+
52 Json::Value
+
53 getAccountOffers(Env& env, AccountID const& acct, bool current = false);
+
54 
+
55 inline Json::Value
+
56 getAccountOffers(Env& env, Account const& acct, bool current = false)
+
57 {
+
58  return getAccountOffers(env, acct.id(), current);
+
59 }
+
60 
+
61 Json::Value
+
62 getAccountLines(Env& env, AccountID const& acctId);
+
63 
+
64 inline Json::Value
+
65 getAccountLines(Env& env, Account const& acct)
+
66 {
+
67  return getAccountLines(env, acct.id());
+
68 }
+
69 
+
70 template <typename... IOU>
+
71 Json::Value
+
72 getAccountLines(Env& env, AccountID const& acctId, IOU... ious)
+
73 {
+
74  auto const jrr = getAccountLines(env, acctId);
+
75  Json::Value res;
+
76  for (auto const& line : jrr[jss::lines])
+
77  {
+
78  for (auto const& iou : {ious...})
+
79  {
+
80  if (line[jss::currency].asString() == to_string(iou.currency))
+
81  {
+
82  Json::Value v;
+
83  v[jss::currency] = line[jss::currency];
+
84  v[jss::balance] = line[jss::balance];
+
85  v[jss::limit] = line[jss::limit];
+
86  v[jss::account] = line[jss::account];
+
87  res[jss::lines].append(v);
+
88  }
+
89  }
+
90  }
+
91  if (!res.isNull())
+
92  return res;
+
93  return jrr;
+
94 }
95 
-
96 template <class T>
-
97 std::enable_if_t<std::is_constructible<Account, T>::value>
-
98 stpath_append_one(STPath& st, T const& t)
-
99 {
-
100  stpath_append_one(st, Account{t});
-
101 }
-
102 
-
103 void
-
104 stpath_append_one(STPath& st, STPathElement const& pe);
-
105 
-
106 template <class T, class... Args>
-
107 void
-
108 stpath_append(STPath& st, T const& t, Args const&... args)
-
109 {
-
110  stpath_append_one(st, t);
-
111  if constexpr (sizeof...(args) > 0)
-
112  stpath_append(st, args...);
-
113 }
-
114 
-
115 template <class... Args>
-
116 void
-
117 stpathset_append(STPathSet& st, STPath const& p, Args const&... args)
-
118 {
-
119  st.push_back(p);
-
120  if constexpr (sizeof...(args) > 0)
-
121  stpathset_append(st, args...);
-
122 }
-
123 
-
124 bool
-
125 equal(STAmount const& sa1, STAmount const& sa2);
-
126 
-
127 // Issue path element
-
128 STPathElement
-
129 IPE(Issue const& iss);
-
130 
-
131 template <class... Args>
-
132 STPath
-
133 stpath(Args const&... args)
-
134 {
-
135  STPath st;
-
136  stpath_append(st, args...);
-
137  return st;
-
138 }
-
139 
-
140 template <class... Args>
-
141 bool
-
142 same(STPathSet const& st1, Args const&... args)
-
143 {
-
144  STPathSet st2;
-
145  stpathset_append(st2, args...);
-
146  if (st1.size() != st2.size())
-
147  return false;
-
148 
-
149  for (auto const& p : st2)
-
150  {
-
151  if (std::find(st1.begin(), st1.end(), p) == st1.end())
-
152  return false;
-
153  }
-
154  return true;
-
155 }
+
96 [[nodiscard]] bool
+
97 checkArraySize(Json::Value const& val, unsigned int size);
+
98 
+
99 /* Path finding */
+
100 /******************************************************************************/
+
101 void
+
102 stpath_append_one(STPath& st, Account const& account);
+
103 
+
104 template <class T>
+
105 std::enable_if_t<std::is_constructible<Account, T>::value>
+
106 stpath_append_one(STPath& st, T const& t)
+
107 {
+
108  stpath_append_one(st, Account{t});
+
109 }
+
110 
+
111 void
+
112 stpath_append_one(STPath& st, STPathElement const& pe);
+
113 
+
114 template <class T, class... Args>
+
115 void
+
116 stpath_append(STPath& st, T const& t, Args const&... args)
+
117 {
+
118  stpath_append_one(st, t);
+
119  if constexpr (sizeof...(args) > 0)
+
120  stpath_append(st, args...);
+
121 }
+
122 
+
123 template <class... Args>
+
124 void
+
125 stpathset_append(STPathSet& st, STPath const& p, Args const&... args)
+
126 {
+
127  st.push_back(p);
+
128  if constexpr (sizeof...(args) > 0)
+
129  stpathset_append(st, args...);
+
130 }
+
131 
+
132 bool
+
133 equal(STAmount const& sa1, STAmount const& sa2);
+
134 
+
135 // Issue path element
+
136 STPathElement
+
137 IPE(Issue const& iss);
+
138 
+
139 template <class... Args>
+
140 STPath
+
141 stpath(Args const&... args)
+
142 {
+
143  STPath st;
+
144  stpath_append(st, args...);
+
145  return st;
+
146 }
+
147 
+
148 template <class... Args>
+
149 bool
+
150 same(STPathSet const& st1, Args const&... args)
+
151 {
+
152  STPathSet st2;
+
153  stpathset_append(st2, args...);
+
154  if (st1.size() != st2.size())
+
155  return false;
156 
-
157 /******************************************************************************/
-
158 
-
159 XRPAmount
-
160 txfee(Env const& env, std::uint16_t n);
-
161 
-
162 PrettyAmount
-
163 xrpMinusFee(Env const& env, std::int64_t xrpAmount);
+
157  for (auto const& p : st2)
+
158  {
+
159  if (std::find(st1.begin(), st1.end(), p) == st1.end())
+
160  return false;
+
161  }
+
162  return true;
+
163 }
164 
-
165 bool
-
166 expectLine(
-
167  Env& env,
-
168  AccountID const& account,
-
169  STAmount const& value,
-
170  bool defaultLimits = false);
-
171 
-
172 template <typename... Amts>
+
165 /******************************************************************************/
+
166 
+
167 XRPAmount
+
168 txfee(Env const& env, std::uint16_t n);
+
169 
+
170 PrettyAmount
+
171 xrpMinusFee(Env const& env, std::int64_t xrpAmount);
+
172 
173 bool
-
174 expectLine(
+
174 expectLine(
175  Env& env,
176  AccountID const& account,
177  STAmount const& value,
-
178  Amts const&... amts)
-
179 {
-
180  return expectLine(env, account, value, false) &&
-
181  expectLine(env, account, amts...);
-
182 }
-
183 
-
184 bool
-
185 expectLine(Env& env, AccountID const& account, None const& value);
-
186 
-
187 bool
-
188 expectOffers(
-
189  Env& env,
-
190  AccountID const& account,
-
191  std::uint16_t size,
-
192  std::vector<Amounts> const& toMatch = {});
-
193 
-
194 Json::Value
-
195 ledgerEntryRoot(Env& env, Account const& acct);
-
196 
-
197 Json::Value
-
198 ledgerEntryState(
-
199  Env& env,
-
200  Account const& acct_a,
-
201  Account const& acct_b,
-
202  std::string const& currency);
-
203 
-
204 Json::Value
-
205 accountBalance(Env& env, Account const& acct);
-
206 
-
207 [[nodiscard]] bool
-
208 expectLedgerEntryRoot(
-
209  Env& env,
-
210  Account const& acct,
-
211  STAmount const& expectedValue);
-
212 
-
213 /* Escrow */
-
214 /******************************************************************************/
-
215 
-
216 Json::Value
-
217 escrow(AccountID const& account, AccountID const& to, STAmount const& amount);
-
218 
-
219 inline Json::Value
-
220 escrow(Account const& account, Account const& to, STAmount const& amount)
-
221 {
-
222  return escrow(account.id(), to.id(), amount);
-
223 }
-
224 
-
225 Json::Value
-
226 finish(AccountID const& account, AccountID const& from, std::uint32_t seq);
-
227 
-
228 inline Json::Value
-
229 finish(Account const& account, Account const& from, std::uint32_t seq)
-
230 {
-
231  return finish(account.id(), from.id(), seq);
-
232 }
-
233 
-
234 Json::Value
-
235 cancel(AccountID const& account, Account const& from, std::uint32_t seq);
-
236 
-
237 inline Json::Value
-
238 cancel(Account const& account, Account const& from, std::uint32_t seq)
-
239 {
-
240  return cancel(account.id(), from, seq);
-
241 }
-
242 
-
243 std::array<std::uint8_t, 39> constexpr cb1 = {
-
244  {0xA0, 0x25, 0x80, 0x20, 0xE3, 0xB0, 0xC4, 0x42, 0x98, 0xFC,
-
245  0x1C, 0x14, 0x9A, 0xFB, 0xF4, 0xC8, 0x99, 0x6F, 0xB9, 0x24,
-
246  0x27, 0xAE, 0x41, 0xE4, 0x64, 0x9B, 0x93, 0x4C, 0xA4, 0x95,
-
247  0x99, 0x1B, 0x78, 0x52, 0xB8, 0x55, 0x81, 0x01, 0x00}};
-
248 
-
249 // A PreimageSha256 fulfillments and its associated condition.
-
250 std::array<std::uint8_t, 4> const fb1 = {{0xA0, 0x02, 0x80, 0x00}};
-
251 
-
253 struct finish_time
-
254 {
-
255 private:
-
256  NetClock::time_point value_;
-
257 
-
258 public:
-
259  explicit finish_time(NetClock::time_point const& value) : value_(value)
-
260  {
-
261  }
-
262 
-
263  void
-
264  operator()(Env&, JTx& jt) const
-
265  {
-
266  jt.jv[sfFinishAfter.jsonName] = value_.time_since_epoch().count();
-
267  }
-
268 };
-
269 
-
271 struct cancel_time
-
272 {
-
273 private:
-
274  NetClock::time_point value_;
-
275 
-
276 public:
-
277  explicit cancel_time(NetClock::time_point const& value) : value_(value)
-
278  {
-
279  }
-
280 
-
281  void
-
282  operator()(jtx::Env&, jtx::JTx& jt) const
-
283  {
-
284  jt.jv[sfCancelAfter.jsonName] = value_.time_since_epoch().count();
-
285  }
-
286 };
-
287 
-
288 struct condition
-
289 {
-
290 private:
-
291  std::string value_;
-
292 
-
293 public:
-
294  explicit condition(Slice const& cond) : value_(strHex(cond))
-
295  {
-
296  }
-
297 
-
298  template <size_t N>
-
299  explicit condition(std::array<std::uint8_t, N> const& c)
-
300  : condition(makeSlice(c))
-
301  {
-
302  }
-
303 
-
304  void
-
305  operator()(Env&, JTx& jt) const
-
306  {
-
307  jt.jv[sfCondition.jsonName] = value_;
-
308  }
-
309 };
-
310 
-
311 struct fulfillment
-
312 {
-
313 private:
-
314  std::string value_;
-
315 
-
316 public:
-
317  explicit fulfillment(Slice condition) : value_(strHex(condition))
-
318  {
-
319  }
-
320 
-
321  template <size_t N>
-
322  explicit fulfillment(std::array<std::uint8_t, N> f)
-
323  : fulfillment(makeSlice(f))
-
324  {
-
325  }
-
326 
-
327  void
-
328  operator()(Env&, JTx& jt) const
-
329  {
-
330  jt.jv[sfFulfillment.jsonName] = value_;
-
331  }
-
332 };
-
333 
-
334 /* Payment Channel */
-
335 /******************************************************************************/
-
336 
-
337 Json::Value
-
338 create(
-
339  AccountID const& account,
-
340  AccountID const& to,
-
341  STAmount const& amount,
-
342  NetClock::duration const& settleDelay,
-
343  PublicKey const& pk,
-
344  std::optional<NetClock::time_point> const& cancelAfter = std::nullopt,
-
345  std::optional<std::uint32_t> const& dstTag = std::nullopt);
-
346 
-
347 inline Json::Value
-
348 create(
-
349  Account const& account,
-
350  Account const& to,
-
351  STAmount const& amount,
-
352  NetClock::duration const& settleDelay,
-
353  PublicKey const& pk,
-
354  std::optional<NetClock::time_point> const& cancelAfter = std::nullopt,
-
355  std::optional<std::uint32_t> const& dstTag = std::nullopt)
-
356 {
-
357  return create(
-
358  account.id(), to.id(), amount, settleDelay, pk, cancelAfter, dstTag);
-
359 }
-
360 
-
361 Json::Value
-
362 fund(
-
363  AccountID const& account,
-
364  uint256 const& channel,
-
365  STAmount const& amount,
-
366  std::optional<NetClock::time_point> const& expiration = std::nullopt);
-
367 
-
368 Json::Value
-
369 claim(
-
370  AccountID const& account,
-
371  uint256 const& channel,
-
372  std::optional<STAmount> const& balance = std::nullopt,
-
373  std::optional<STAmount> const& amount = std::nullopt,
-
374  std::optional<Slice> const& signature = std::nullopt,
-
375  std::optional<PublicKey> const& pk = std::nullopt);
-
376 
-
377 uint256
-
378 channel(
-
379  AccountID const& account,
-
380  AccountID const& dst,
-
381  std::uint32_t seqProxyValue);
-
382 
-
383 inline uint256
-
384 channel(Account const& account, Account const& dst, std::uint32_t seqProxyValue)
-
385 {
-
386  return channel(account.id(), dst.id(), seqProxyValue);
-
387 }
-
388 
-
389 STAmount
-
390 channelBalance(ReadView const& view, uint256 const& chan);
-
391 
-
392 bool
-
393 channelExists(ReadView const& view, uint256 const& chan);
-
394 
-
395 /* Crossing Limits */
-
396 /******************************************************************************/
-
397 
-
398 void
-
399 n_offers(
-
400  Env& env,
-
401  std::size_t n,
-
402  Account const& account,
-
403  STAmount const& in,
-
404  STAmount const& out);
+
178  bool defaultLimits = false);
+
179 
+
180 template <typename... Amts>
+
181 bool
+
182 expectLine(
+
183  Env& env,
+
184  AccountID const& account,
+
185  STAmount const& value,
+
186  Amts const&... amts)
+
187 {
+
188  return expectLine(env, account, value, false) &&
+
189  expectLine(env, account, amts...);
+
190 }
+
191 
+
192 bool
+
193 expectLine(Env& env, AccountID const& account, None const& value);
+
194 
+
195 bool
+
196 expectOffers(
+
197  Env& env,
+
198  AccountID const& account,
+
199  std::uint16_t size,
+
200  std::vector<Amounts> const& toMatch = {});
+
201 
+
202 Json::Value
+
203 ledgerEntryRoot(Env& env, Account const& acct);
+
204 
+
205 Json::Value
+
206 ledgerEntryState(
+
207  Env& env,
+
208  Account const& acct_a,
+
209  Account const& acct_b,
+
210  std::string const& currency);
+
211 
+
212 Json::Value
+
213 accountBalance(Env& env, Account const& acct);
+
214 
+
215 [[nodiscard]] bool
+
216 expectLedgerEntryRoot(
+
217  Env& env,
+
218  Account const& acct,
+
219  STAmount const& expectedValue);
+
220 
+
221 /* Escrow */
+
222 /******************************************************************************/
+
223 
+
224 Json::Value
+
225 escrow(AccountID const& account, AccountID const& to, STAmount const& amount);
+
226 
+
227 inline Json::Value
+
228 escrow(Account const& account, Account const& to, STAmount const& amount)
+
229 {
+
230  return escrow(account.id(), to.id(), amount);
+
231 }
+
232 
+
233 Json::Value
+
234 finish(AccountID const& account, AccountID const& from, std::uint32_t seq);
+
235 
+
236 inline Json::Value
+
237 finish(Account const& account, Account const& from, std::uint32_t seq)
+
238 {
+
239  return finish(account.id(), from.id(), seq);
+
240 }
+
241 
+
242 Json::Value
+
243 cancel(AccountID const& account, Account const& from, std::uint32_t seq);
+
244 
+
245 inline Json::Value
+
246 cancel(Account const& account, Account const& from, std::uint32_t seq)
+
247 {
+
248  return cancel(account.id(), from, seq);
+
249 }
+
250 
+
251 std::array<std::uint8_t, 39> constexpr cb1 = {
+
252  {0xA0, 0x25, 0x80, 0x20, 0xE3, 0xB0, 0xC4, 0x42, 0x98, 0xFC,
+
253  0x1C, 0x14, 0x9A, 0xFB, 0xF4, 0xC8, 0x99, 0x6F, 0xB9, 0x24,
+
254  0x27, 0xAE, 0x41, 0xE4, 0x64, 0x9B, 0x93, 0x4C, 0xA4, 0x95,
+
255  0x99, 0x1B, 0x78, 0x52, 0xB8, 0x55, 0x81, 0x01, 0x00}};
+
256 
+
257 // A PreimageSha256 fulfillments and its associated condition.
+
258 std::array<std::uint8_t, 4> const fb1 = {{0xA0, 0x02, 0x80, 0x00}};
+
259 
+
261 struct finish_time
+
262 {
+
263 private:
+
264  NetClock::time_point value_;
+
265 
+
266 public:
+
267  explicit finish_time(NetClock::time_point const& value) : value_(value)
+
268  {
+
269  }
+
270 
+
271  void
+
272  operator()(Env&, JTx& jt) const
+
273  {
+
274  jt.jv[sfFinishAfter.jsonName] = value_.time_since_epoch().count();
+
275  }
+
276 };
+
277 
+
279 struct cancel_time
+
280 {
+
281 private:
+
282  NetClock::time_point value_;
+
283 
+
284 public:
+
285  explicit cancel_time(NetClock::time_point const& value) : value_(value)
+
286  {
+
287  }
+
288 
+
289  void
+
290  operator()(jtx::Env&, jtx::JTx& jt) const
+
291  {
+
292  jt.jv[sfCancelAfter.jsonName] = value_.time_since_epoch().count();
+
293  }
+
294 };
+
295 
+
296 struct condition
+
297 {
+
298 private:
+
299  std::string value_;
+
300 
+
301 public:
+
302  explicit condition(Slice const& cond) : value_(strHex(cond))
+
303  {
+
304  }
+
305 
+
306  template <size_t N>
+
307  explicit condition(std::array<std::uint8_t, N> const& c)
+
308  : condition(makeSlice(c))
+
309  {
+
310  }
+
311 
+
312  void
+
313  operator()(Env&, JTx& jt) const
+
314  {
+
315  jt.jv[sfCondition.jsonName] = value_;
+
316  }
+
317 };
+
318 
+
319 struct fulfillment
+
320 {
+
321 private:
+
322  std::string value_;
+
323 
+
324 public:
+
325  explicit fulfillment(Slice condition) : value_(strHex(condition))
+
326  {
+
327  }
+
328 
+
329  template <size_t N>
+
330  explicit fulfillment(std::array<std::uint8_t, N> f)
+
331  : fulfillment(makeSlice(f))
+
332  {
+
333  }
+
334 
+
335  void
+
336  operator()(Env&, JTx& jt) const
+
337  {
+
338  jt.jv[sfFulfillment.jsonName] = value_;
+
339  }
+
340 };
+
341 
+
342 /* Payment Channel */
+
343 /******************************************************************************/
+
344 
+
345 Json::Value
+
346 create(
+
347  AccountID const& account,
+
348  AccountID const& to,
+
349  STAmount const& amount,
+
350  NetClock::duration const& settleDelay,
+
351  PublicKey const& pk,
+
352  std::optional<NetClock::time_point> const& cancelAfter = std::nullopt,
+
353  std::optional<std::uint32_t> const& dstTag = std::nullopt);
+
354 
+
355 inline Json::Value
+
356 create(
+
357  Account const& account,
+
358  Account const& to,
+
359  STAmount const& amount,
+
360  NetClock::duration const& settleDelay,
+
361  PublicKey const& pk,
+
362  std::optional<NetClock::time_point> const& cancelAfter = std::nullopt,
+
363  std::optional<std::uint32_t> const& dstTag = std::nullopt)
+
364 {
+
365  return create(
+
366  account.id(), to.id(), amount, settleDelay, pk, cancelAfter, dstTag);
+
367 }
+
368 
+
369 Json::Value
+
370 fund(
+
371  AccountID const& account,
+
372  uint256 const& channel,
+
373  STAmount const& amount,
+
374  std::optional<NetClock::time_point> const& expiration = std::nullopt);
+
375 
+
376 Json::Value
+
377 claim(
+
378  AccountID const& account,
+
379  uint256 const& channel,
+
380  std::optional<STAmount> const& balance = std::nullopt,
+
381  std::optional<STAmount> const& amount = std::nullopt,
+
382  std::optional<Slice> const& signature = std::nullopt,
+
383  std::optional<PublicKey> const& pk = std::nullopt);
+
384 
+
385 uint256
+
386 channel(
+
387  AccountID const& account,
+
388  AccountID const& dst,
+
389  std::uint32_t seqProxyValue);
+
390 
+
391 inline uint256
+
392 channel(Account const& account, Account const& dst, std::uint32_t seqProxyValue)
+
393 {
+
394  return channel(account.id(), dst.id(), seqProxyValue);
+
395 }
+
396 
+
397 STAmount
+
398 channelBalance(ReadView const& view, uint256 const& chan);
+
399 
+
400 bool
+
401 channelExists(ReadView const& view, uint256 const& chan);
+
402 
+
403 /* Crossing Limits */
+
404 /******************************************************************************/
405 
-
406 /* Pay Strand */
-
407 /***************************************************************/
-
408 
-
409 // Currency path element
-
410 STPathElement
-
411 cpe(Currency const& c);
-
412 
-
413 // All path element
-
414 STPathElement
-
415 allpe(AccountID const& a, Issue const& iss);
-
416 /***************************************************************/
-
417 
-
418 /* Check */
-
419 /***************************************************************/
-
420 namespace check {
-
421 
-
423 // clang-format off
-
424 template <typename A>
-
425  requires std::is_same_v<A, AccountID>
-
426 Json::Value
-
427 create(A const& account, A const& dest, STAmount const& sendMax)
-
428 {
-
429  Json::Value jv;
-
430  jv[sfAccount.jsonName] = to_string(account);
-
431  jv[sfSendMax.jsonName] = sendMax.getJson(JsonOptions::none);
-
432  jv[sfDestination.jsonName] = to_string(dest);
-
433  jv[sfTransactionType.jsonName] = jss::CheckCreate;
-
434  jv[sfFlags.jsonName] = tfUniversal;
-
435  return jv;
-
436 }
-
437 // clang-format on
-
438 
-
439 inline Json::Value
-
440 create(
-
441  jtx::Account const& account,
-
442  jtx::Account const& dest,
-
443  STAmount const& sendMax)
-
444 {
-
445  return create(account.id(), dest.id(), sendMax);
-
446 }
-
447 
-
448 } // namespace check
-
449 
-
450 } // namespace jtx
-
451 } // namespace test
-
452 } // namespace ripple
-
453 
-
454 #endif // RIPPLE_TEST_JTX_TESTHELPERS_H_INCLUDED
+
406 void
+
407 n_offers(
+
408  Env& env,
+
409  std::size_t n,
+
410  Account const& account,
+
411  STAmount const& in,
+
412  STAmount const& out);
+
413 
+
414 /* Pay Strand */
+
415 /***************************************************************/
+
416 
+
417 // Currency path element
+
418 STPathElement
+
419 cpe(Currency const& c);
+
420 
+
421 // All path element
+
422 STPathElement
+
423 allpe(AccountID const& a, Issue const& iss);
+
424 /***************************************************************/
+
425 
+
426 /* Check */
+
427 /***************************************************************/
+
428 namespace check {
+
429 
+
431 // clang-format off
+
432 template <typename A>
+
433  requires std::is_same_v<A, AccountID>
+
434 Json::Value
+
435 create(A const& account, A const& dest, STAmount const& sendMax)
+
436 {
+
437  Json::Value jv;
+
438  jv[sfAccount.jsonName] = to_string(account);
+
439  jv[sfSendMax.jsonName] = sendMax.getJson(JsonOptions::none);
+
440  jv[sfDestination.jsonName] = to_string(dest);
+
441  jv[sfTransactionType.jsonName] = jss::CheckCreate;
+
442  jv[sfFlags.jsonName] = tfUniversal;
+
443  return jv;
+
444 }
+
445 // clang-format on
+
446 
+
447 inline Json::Value
+
448 create(
+
449  jtx::Account const& account,
+
450  jtx::Account const& dest,
+
451  STAmount const& sendMax)
+
452 {
+
453  return create(account.id(), dest.id(), sendMax);
+
454 }
+
455 
+
456 } // namespace check
+
457 
+
458 } // namespace jtx
+
459 } // namespace test
+
460 } // namespace ripple
+
461 
+
462 #endif // RIPPLE_TEST_JTX_TESTHELPERS_H_INCLUDED
-
ripple::test::jtx::cancel_time::operator()
void operator()(jtx::Env &, jtx::JTx &jt) const
Definition: TestHelpers.h:282
+
ripple::test::jtx::getAccountOffers
Json::Value getAccountOffers(Env &env, AccountID const &acct, bool current)
Definition: TestHelpers.cpp:32
+
ripple::test::jtx::cancel_time::operator()
void operator()(jtx::Env &, jtx::JTx &jt) const
Definition: TestHelpers.h:290
ripple::makeSlice
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
Definition: Slice.h:241
ripple::test::jtx::claim
Json::Value claim(AccountID const &account, uint256 const &channel, std::optional< STAmount > const &balance, std::optional< STAmount > const &amount, std::optional< Slice > const &signature, std::optional< PublicKey > const &pk)
Definition: TestHelpers.cpp:293
ripple::Issue
A currency issued by an account.
Definition: Issue.h:35
ripple::test::jtx::checkArraySize
bool checkArraySize(Json::Value const &val, unsigned int size)
Definition: TestHelpers.cpp:48
ripple::sfSendMax
const SF_AMOUNT sfSendMax
std::string
STL class.
-
ripple::test::jtx::condition::condition
condition(Slice const &cond)
Definition: TestHelpers.h:294
-
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:142
+
ripple::test::jtx::condition::condition
condition(Slice const &cond)
Definition: TestHelpers.h:302
+
ripple::test::jtx::same
bool same(STPathSet const &st1, Args const &... args)
Definition: TestHelpers.h:150
ripple::test::jtx::finish
Json::Value finish(AccountID const &account, AccountID const &from, std::uint32_t seq)
Definition: TestHelpers.cpp:224
ripple::sfDestination
const SF_ACCOUNT sfDestination
ripple::test::jtx::stpath_append_one
void stpath_append_one(STPath &st, Account const &account)
Definition: TestHelpers.cpp:56
ripple::test::jtx::ledgerEntryState
Json::Value ledgerEntryState(Env &env, Account const &acct_a, Account const &acct_b, std::string const &currency)
Definition: TestHelpers.cpp:177
-
ripple::test::jtx::finish_time
Set the "FinishAfter" time tag on a JTx.
Definition: TestHelpers.h:253
+
ripple::test::jtx::finish_time
Set the "FinishAfter" time tag on a JTx.
Definition: TestHelpers.h:261
ripple::Slice
An immutable linear range of bytes.
Definition: Slice.h:44
ripple::test::jtx::balance
A balance matches.
Definition: balance.h:38
-
ripple::test::jtx::check::create
requires std::is_same_v< A, AccountID > Json::Value create(A const &account, A const &dest, STAmount const &sendMax)
Create a check.
Definition: TestHelpers.h:427
-
std::vector
STL class.
+
ripple::test::jtx::check::create
requires std::is_same_v< A, AccountID > Json::Value create(A const &account, A const &dest, STAmount const &sendMax)
Create a check.
Definition: TestHelpers.h:435
+
vector
std::find
T find(T... args)
ripple::STAmount::getJson
Json::Value getJson(JsonOptions) const override
Definition: STAmount.cpp:653
std::chrono::duration
@@ -553,58 +562,58 @@ $(function() {
ripple::requires
requires(T::ConsequencesFactory==Transactor::Normal) TxConsequences consequences_helper(PreflightContext const &ctx)
Definition: applySteps.cpp:181
ripple::test::jtx::Account::id
AccountID id() const
Returns the Account ID.
Definition: Account.h:106
ripple::test::jtx::expiration
Set Expiration on a JTx.
Definition: Check_test.cpp:29
-
ripple::base_uint< 160, detail::AccountIDTag >
+
ripple::base_uint
Integers of any length that is a multiple of 32-bits.
Definition: base_uint.h:82
ripple::sfTransactionType
const SF_UINT16 sfTransactionType
-
ripple::test::jtx::cancel_time::cancel_time
cancel_time(NetClock::time_point const &value)
Definition: TestHelpers.h:277
+
ripple::test::jtx::cancel_time::cancel_time
cancel_time(NetClock::time_point const &value)
Definition: TestHelpers.h:285
std::chrono::time_point::time_since_epoch
T time_since_epoch(T... args)
Json::Value::append
Value & append(const Value &value)
Append value to array at the end.
Definition: json_value.cpp:882
ripple::test::jtx::channel
uint256 channel(AccountID const &account, AccountID const &dst, std::uint32_t seqProxyValue)
Definition: TestHelpers.cpp:318
ripple::STPathSet::size
std::vector< STPath >::size_type size() const
Definition: STPathSet.h:497
ripple::PublicKey
A public key.
Definition: PublicKey.h:61
std::enable_if_t
-
ripple::test::jtx::stpath_append
void stpath_append(STPath &st, T const &t, Args const &... args)
Definition: TestHelpers.h:108
+
ripple::test::jtx::stpath_append
void stpath_append(STPath &st, T const &t, Args const &... args)
Definition: TestHelpers.h:116
ripple::test::jtx::IPE
STPathElement IPE(Issue const &iss)
Definition: TestHelpers.cpp:75
ripple::JsonOptions::none
@ none
-
ripple::test::jtx::condition::condition
condition(std::array< std::uint8_t, N > const &c)
Definition: TestHelpers.h:299
-
ripple::test::jtx::stpathset_append
void stpathset_append(STPathSet &st, STPath const &p, Args const &... args)
Definition: TestHelpers.h:117
+
ripple::test::jtx::condition::condition
condition(std::array< std::uint8_t, N > const &c)
Definition: TestHelpers.h:307
+
ripple::test::jtx::stpathset_append
void stpathset_append(STPathSet &st, STPath const &p, Args const &... args)
Definition: TestHelpers.h:125
ripple::test::jtx::JTx
Execution context for applying a JSON transaction.
Definition: JTx.h:42
ripple::test::jtx::JTx::jv
Json::Value jv
Definition: JTx.h:44
-
ripple::test::jtx::fulfillment
Definition: TestHelpers.h:311
-
ripple::test::jtx::finish_time::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:264
-
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:133
+
ripple::test::jtx::fulfillment
Definition: TestHelpers.h:319
+
ripple::test::jtx::finish_time::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:272
+
ripple::test::jtx::stpath
STPath stpath(Args const &... args)
Definition: TestHelpers.h:141
ripple::test::jtx::expectOffers
bool expectOffers(Env &env, AccountID const &account, std::uint16_t size, std::vector< Amounts > const &toMatch)
Definition: TestHelpers.cpp:140
std::array< std::uint8_t, 39 >
-
ripple::test::jtx::cancel_time
Set the "CancelAfter" time tag on a JTx.
Definition: TestHelpers.h:271
+
ripple::test::jtx::cancel_time
Set the "CancelAfter" time tag on a JTx.
Definition: TestHelpers.h:279
ripple::STAmount
Definition: STAmount.h:46
std::chrono::time_point
-
ripple::test::jtx::cancel_time::value_
NetClock::time_point value_
Definition: TestHelpers.h:274
+
ripple::test::jtx::cancel_time::value_
NetClock::time_point value_
Definition: TestHelpers.h:282
ripple::ValStatus::current
@ current
This was a new validation and was added.
std::uint16_t
ripple::test::jtx::cpe
STPathElement cpe(Currency const &c)
Definition: TestHelpers.cpp:368
ripple::test::jtx::allpe
STPathElement allpe(AccountID const &a, Issue const &iss)
Definition: TestHelpers.cpp:376
ripple::test::jtx::cancel
Json::Value cancel(AccountID const &account, Account const &from, std::uint32_t seq)
Definition: TestHelpers.cpp:236
-
ripple::test::jtx::finish_time::finish_time
finish_time(NetClock::time_point const &value)
Definition: TestHelpers.h:259
-
ripple::test::jtx::condition::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:305
+
ripple::test::jtx::finish_time::finish_time
finish_time(NetClock::time_point const &value)
Definition: TestHelpers.h:267
+
ripple::test::jtx::condition::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:313
ripple::test::jtx::channelBalance
STAmount channelBalance(ReadView const &view, uint256 const &chan)
Definition: TestHelpers.cpp:328
-
ripple::test::jtx::fulfillment::fulfillment
fulfillment(Slice condition)
Definition: TestHelpers.h:317
+
ripple::test::jtx::fulfillment::fulfillment
fulfillment(Slice condition)
Definition: TestHelpers.h:325
ripple::test::jtx::None
Definition: amount.h:57
ripple::test::jtx::seq
Set the sequence number on a JTx.
Definition: seq.h:33
-
ranges
ripple::ReadView
A view into a ledger.
Definition: ReadView.h:54
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
-
ripple::test::jtx::condition::value_
std::string value_
Definition: TestHelpers.h:291
+
ripple::test::jtx::condition::value_
std::string value_
Definition: TestHelpers.h:299
ripple::test::jtx::IOU
Converts to IOU Issue or STAmount.
Definition: amount.h:291
ripple::STPathSet::begin
std::vector< STPath >::const_iterator begin() const
Definition: STPathSet.h:485
ripple::sfCondition
const SF_VL sfCondition
ripple::STPathElement
Definition: STPathSet.h:34
-
std::ranges::begin
T begin(T... args)
+
std::begin
T begin(T... args)
ripple::sfFlags
const SF_UINT32 sfFlags
-
ripple::test::jtx::condition
Definition: TestHelpers.h:288
-
ripple::test::jtx::fulfillment::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:328
+
ripple::test::jtx::condition
Definition: TestHelpers.h:296
+
ripple::test::jtx::fulfillment::operator()
void operator()(Env &, JTx &jt) const
Definition: TestHelpers.h:336
ripple::test::jtx::accountBalance
Json::Value accountBalance(Env &env, Account const &acct)
Definition: TestHelpers.cpp:193
ripple::test::jtx::fund
void fund(jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, std::vector< STAmount > const &amts, Fund how)
Definition: AMMTest.cpp:35
-
ripple::test::jtx::cb1
constexpr std::array< std::uint8_t, 39 > cb1
Definition: TestHelpers.h:243
+
ripple::test::jtx::cb1
constexpr std::array< std::uint8_t, 39 > cb1
Definition: TestHelpers.h:251
ripple::sfCancelAfter
const SF_UINT32 sfCancelAfter
+
ripple::test::jtx::make_vector
auto make_vector(Input const &input) requires requires(Input &v)
Definition: TestHelpers.h:42
std::optional
std::size_t
ripple::to_string
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
Definition: app/misc/impl/Manifest.cpp:41
@@ -612,11 +621,11 @@ $(function() {
ripple::test::jtx::Account
Immutable cryptographic account descriptor.
Definition: Account.h:37
ripple::sfAccount
const SF_ACCOUNT sfAccount
ripple::strHex
std::string strHex(FwdIt begin, FwdIt end)
Definition: strHex.h:30
-
ripple::test::jtx::finish_time::value_
NetClock::time_point value_
Definition: TestHelpers.h:256
+
std::end
T end(T... args)
+
ripple::test::jtx::finish_time::value_
NetClock::time_point value_
Definition: TestHelpers.h:264
ripple::tfUniversal
constexpr std::uint32_t tfUniversal
Definition: TxFlags.h:59
-
ripple::test::jtx::fulfillment::value_
std::string value_
Definition: TestHelpers.h:314
-
ripple::test::jtx::fb1
const std::array< std::uint8_t, 4 > fb1
Definition: TestHelpers.h:250
-
ripple::test::jtx::getAccountOffers
auto make_vector(auto const &input) requires std Json::Value getAccountOffers(Env &env, Account const &acct, bool current=false)
Definition: TestHelpers.h:48
+
ripple::test::jtx::fulfillment::value_
std::string value_
Definition: TestHelpers.h:322
+
ripple::test::jtx::fb1
const std::array< std::uint8_t, 4 > fb1
Definition: TestHelpers.h:258
ripple::STPath
Definition: STPathSet.h:118
ripple::test::jtx::escrow
Json::Value escrow(AccountID const &account, AccountID const &to, STAmount const &amount)
Definition: TestHelpers.cpp:212
ripple::test::jtx::expectLedgerEntryRoot
bool expectLedgerEntryRoot(Env &env, Account const &acct, STAmount const &expectedValue)
Definition: TestHelpers.cpp:200
@@ -630,7 +639,7 @@ $(function() {
Json::Value
Represents a JSON value.
Definition: json_value.h:145
ripple::test::jtx::PrettyAmount
Represents an XRP or IOU quantity This customizes the string conversion and supports XRP conversions ...
Definition: amount.h:73
ripple::XRPAmount
Definition: XRPAmount.h:46
-
ripple::test::jtx::fulfillment::fulfillment
fulfillment(std::array< std::uint8_t, N > f)
Definition: TestHelpers.h:322
+
ripple::test::jtx::fulfillment::fulfillment
fulfillment(std::array< std::uint8_t, N > f)
Definition: TestHelpers.h:330
ripple::STPathSet::push_back
void push_back(STPath const &e)
Definition: STPathSet.h:509