rippled
Loading...
Searching...
No Matches
fee.cpp
1#include <test/jtx/fee.h>
2
3#include <xrpl/protocol/jss.h>
4
5namespace ripple {
6namespace test {
7namespace jtx {
8
9void
10fee::operator()(Env& env, JTx& jt) const
11{
12 if (!manual_)
13 return;
14 jt.fill_fee = false;
15 assert(!increment_ || !amount_);
16 if (increment_)
17 jt[sfFee] = STAmount(env.current()->fees().increment).getJson();
18 else if (amount_)
19 jt[sfFee] = amount_->getJson(JsonOptions::none);
20}
21
22} // namespace jtx
23} // namespace test
24} // namespace ripple
Json::Value getJson(JsonOptions=JsonOptions::none) const override
Definition STAmount.cpp:753
A transaction testing environment.
Definition Env.h:102
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
Definition Env.h:312
std::optional< STAmount > amount_
Definition fee.h:22
void operator()(Env &, JTx &jt) const
Definition fee.cpp:10
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
Execution context for applying a JSON transaction.
Definition JTx.h:26