18 #include <ripple/ledger/BookDirs.h>
19 #include <ripple/protocol/Feature.h>
31 Env env(*
this, features);
34 env.
fund(
XRP(1000000),
"alice",
"bob",
"gw");
50 env(offer(
"alice",
Account(
"alice")[
"USD"](50),
XRP(10)));
58 env(offer(
"alice", gw[
"CNY"](50),
XRP(10)));
66 env(
pay(
"bob",
"alice",
Account(
"bob")[
"CNY"](10)));
67 env(offer(
"alice", USD(50),
Account(
"bob")[
"CNY"](10)));
76 for (
auto i = 1, j = 3; i <= 3; ++i, --j)
77 for (
auto k = 0; k < 80; ++k)
78 env(offer(
"alice", AUD(i),
XRP(j)));
82 auto i = 1, j = 3, k = 0;
83 for (
auto const& e : d)
85 BEAST_EXPECT(e->getFieldAmount(
sfTakerPays) == AUD(i));
const XRP_t XRP
Converts to XRP Issue or STAmount.
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
const SF_AMOUNT sfTakerPays
Book reversed(Book const &book)
const SF_AMOUNT sfTakerGets
void test_bookdir(FeatureBitset features)
FeatureBitset supported_amendments()
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Json::Value pay(Account const &account, Account const &to, AnyAmount amount)
Create a payment.
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
Immutable cryptographic account descriptor.
const uint256 featureFlowCross
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
A transaction testing environment.
BEAST_DEFINE_TESTSUITE(DeliverMin, app, ripple)