xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
test
jtx
impl
fee.cpp
1
#include <test/jtx/fee.h>
2
3
#include <test/jtx/Env.h>
4
#include <test/jtx/JTx.h>
5
6
#include <xrpl/protocol/SField.h>
7
8
#include <
cassert
>
9
10
namespace
xrpl::test::jtx
{
11
12
void
13
Fee::operator()
(
Env
& env,
JTx
& jt)
const
14
{
15
if
(!
manual_
)
16
return
;
17
jt.
fillFee
=
false
;
18
assert(!
increment_
|| !
amount_
);
19
if
(
increment_
)
20
{
21
jt[sfFee] =
STAmount
(env.
current
()->fees().increment).
getJson
();
22
}
23
else
if
(
amount_
)
24
{
25
jt[sfFee] =
amount_
->getJson(
JsonOptions::Values::None
);
26
}
27
}
28
29
}
// namespace xrpl::test::jtx
cassert
xrpl::STAmount
Definition
STAmount.h:46
xrpl::STAmount::getJson
json::Value getJson(JsonOptions=JsonOptions::Values::None) const override
Definition
STAmount.cpp:735
xrpl::test::jtx::Env
A transaction testing environment.
Definition
Env.h:161
xrpl::test::jtx::Env::current
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
Definition
Env.h:377
xrpl::test::jtx::Fee::manual_
bool manual_
Definition
fee.h:22
xrpl::test::jtx::Fee::operator()
void operator()(Env &, JTx &jt) const
Definition
fee.cpp:13
xrpl::test::jtx::Fee::increment_
bool increment_
Definition
fee.h:23
xrpl::test::jtx::Fee::amount_
std::optional< STAmount > amount_
Definition
fee.h:24
xrpl::test::jtx
Definition
Oracle_test.cpp:34
xrpl::JsonOptions::Values::None
@ None
Definition
STBase.h:27
xrpl::test::jtx::JTx
Execution context for applying a JSON transaction.
Definition
JTx.h:27
xrpl::test::jtx::JTx::fillFee
bool fillFee
Definition
JTx.h:33
Generated by
1.17.0