22#include <xrpld/app/ledger/Ledger.h>
23#include <xrpld/core/ConfigSections.h>
24#include <xrpld/ledger/ApplyViewImpl.h>
25#include <xrpld/ledger/OpenView.h>
26#include <xrpld/ledger/PaymentSandbox.h>
27#include <xrpld/ledger/Sandbox.h>
29#include <xrpl/protocol/Feature.h>
49 auto const le = std::make_shared<SLE>(
k(
id));
50 le->setFieldU32(sfSequence,
seq);
59 return le->getFieldU32(sfSequence);
66 le->setFieldU32(sfSequence,
seq);
79 next = view.
succ(*next);
97 next = ledger.
succ(*next);
112 auto const next = v.
succ(
k(
id).key);
115 if (BEAST_EXPECT(next))
116 BEAST_EXPECT(*next ==
k(*answer).
key);
128 return std::make_shared<std::remove_const_t<T>>(*sp);
144 env.
app().getNodeFamily());
145 auto const ledger = std::make_shared<Ledger>(
149 succ(v, 0, std::nullopt);
150 ledger->rawInsert(
sle(1, 1));
152 BEAST_EXPECT(
seq(v.
read(
k(1))) == 1);
154 succ(v, 1, std::nullopt);
155 ledger->rawInsert(
sle(2, 2));
156 BEAST_EXPECT(
seq(v.
read(
k(2))) == 2);
157 ledger->rawInsert(
sle(3, 3));
158 BEAST_EXPECT(
seq(v.
read(
k(3))) == 3);
161 ledger->rawReplace(s);
162 BEAST_EXPECT(
seq(v.
read(
k(2))) == 4);
163 ledger->rawErase(
sle(2));
179 succ(v, 0, std::nullopt);
182 BEAST_EXPECT(
seq(v.
read(
k(1))) == 1);
183 BEAST_EXPECT(
seq(v.
peek(
k(1))) == 1);
185 succ(v, 1, std::nullopt);
187 BEAST_EXPECT(
seq(v.
read(
k(2))) == 2);
189 auto s = v.
peek(
k(3));
190 BEAST_EXPECT(
seq(s) == 3);
194 BEAST_EXPECT(
seq(v.
read(
k(2))) == 4);
232 succ(v0, 7, std::nullopt);
241 succ(v1, 7, std::nullopt);
265 succ(v0, 7, std::nullopt);
286 auto s = v1.
peek(
k(4));
289 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
290 BEAST_EXPECT(!v1.
exists(
k(2)));
291 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 3);
292 BEAST_EXPECT(
seq(v1.
read(
k(4))) == 5);
295 auto s2 = v2.
peek(
k(3));
299 BEAST_EXPECT(
seq(v2.
read(
k(1))) == 1);
300 BEAST_EXPECT(!v2.
exists(
k(2)));
301 BEAST_EXPECT(
seq(v2.
read(
k(3))) == 6);
302 BEAST_EXPECT(!v2.
exists(
k(4)));
305 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
306 BEAST_EXPECT(!v1.
exists(
k(2)));
307 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 3);
308 BEAST_EXPECT(
seq(v1.
read(
k(4))) == 5);
312 auto s2 = v2.
peek(
k(3));
316 BEAST_EXPECT(
seq(v2.
read(
k(1))) == 1);
317 BEAST_EXPECT(!v2.
exists(
k(2)));
318 BEAST_EXPECT(
seq(v2.
read(
k(3))) == 6);
319 BEAST_EXPECT(!v2.
exists(
k(4)));
322 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
323 BEAST_EXPECT(!v1.
exists(
k(2)));
324 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 6);
325 BEAST_EXPECT(!v1.
exists(
k(4)));
328 BEAST_EXPECT(
seq(v0.
read(
k(1))) == 1);
329 BEAST_EXPECT(!v0.
exists(
k(2)));
330 BEAST_EXPECT(
seq(v0.
read(
k(3))) == 6);
331 BEAST_EXPECT(!v0.
exists(
k(4)));
347 BEAST_EXPECT(v0.
seq() != 98);
348 BEAST_EXPECT(v0.
seq() ==
open->seq());
354 BEAST_EXPECT(v1.
seq() == v0.
seq());
359 BEAST_EXPECT(v2.
seq() == v1.
seq());
363 BEAST_EXPECT(v3.
seq() == v2.
seq());
370 BEAST_EXPECT(v2.
seq() == v0.
seq());
374 BEAST_EXPECT(v3.
seq() == v2.
seq());
387 for (
auto const&
sle : ledger.
sles)
392 template <
class... Args>
411 env.
app().getNodeFamily());
412 auto const ledger = std::make_shared<Ledger>(
419 ledger->rawInsert(
sle(x));
424 BEAST_EXPECT(
sles(*ledger) ==
list(1, 2, 3));
425 auto e = ledger->stateMap().end();
426 auto b1 = ledger->stateMap().begin();
427 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
428 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == b1);
430 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
432 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
433 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
434 b1 = ledger->stateMap().begin();
435 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b1);
437 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
439 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
440 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == e);
445 BEAST_EXPECT(
sles(*ledger) ==
list(2, 4, 6));
446 auto e = ledger->stateMap().end();
447 auto b1 = ledger->stateMap().begin();
448 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
449 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
450 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
451 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
453 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
454 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b1);
456 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b1);
457 b1 = ledger->stateMap().begin();
458 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
460 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
461 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b1);
464 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b1);
465 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b1);
466 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == e);
467 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == e);
470 setup({2, 3, 5, 6, 10, 15});
471 BEAST_EXPECT(
sles(*ledger) ==
list(2, 3, 5, 6, 10, 15));
472 auto e = ledger->stateMap().end();
473 auto b = ledger->stateMap().begin();
474 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
475 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
476 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b);
478 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b);
479 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b);
481 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b);
483 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b);
484 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(8)) == b);
485 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(9)) == b);
486 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(10)) == b);
488 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(11)) == b);
489 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(12)) == b);
490 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(13)) == b);
491 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(14)) == b);
492 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(15)) == b);
494 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(16)) == b);
495 b = ledger->stateMap().begin();
496 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b);
497 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b);
499 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b);
501 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b);
502 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b);
504 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b);
506 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == b);
507 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == b);
508 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(8)) == b);
509 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(9)) == b);
511 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(10)) == b);
512 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(11)) == b);
513 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(12)) == b);
514 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(13)) == b);
515 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(14)) == b);
517 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(15)) == e);
518 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(16)) == e);
522 setup({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
523 13, 14, 15, 16, 20, 25, 30, 32, 33, 34, 35, 36, 37,
524 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 66, 100});
567 auto b = ledger->stateMap().begin();
568 auto e = ledger->stateMap().end();
569 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(0)) == e);
570 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == b);
572 ledger->stateMap().lower_bound(
uint256(5))->key() ==
575 ledger->stateMap().lower_bound(
uint256(15))->key() ==
578 ledger->stateMap().lower_bound(
uint256(16))->key() ==
581 ledger->stateMap().lower_bound(
uint256(19))->key() ==
584 ledger->stateMap().lower_bound(
uint256(20))->key() ==
587 ledger->stateMap().lower_bound(
uint256(24))->key() ==
590 ledger->stateMap().lower_bound(
uint256(31))->key() ==
593 ledger->stateMap().lower_bound(
uint256(32))->key() ==
596 ledger->stateMap().lower_bound(
uint256(40))->key() ==
599 ledger->stateMap().lower_bound(
uint256(47))->key() ==
602 ledger->stateMap().lower_bound(
uint256(48))->key() ==
605 ledger->stateMap().lower_bound(
uint256(64))->key() ==
609 ledger->stateMap().lower_bound(
uint256(90))->key() ==
612 ledger->stateMap().lower_bound(
uint256(96))->key() ==
615 ledger->stateMap().lower_bound(
uint256(100))->key() ==
619 ledger->stateMap().upper_bound(
uint256(0))->key() ==
622 ledger->stateMap().upper_bound(
uint256(5))->key() ==
625 ledger->stateMap().upper_bound(
uint256(15))->key() ==
628 ledger->stateMap().upper_bound(
uint256(16))->key() ==
631 ledger->stateMap().upper_bound(
uint256(18))->key() ==
634 ledger->stateMap().upper_bound(
uint256(20))->key() ==
637 ledger->stateMap().upper_bound(
uint256(31))->key() ==
640 ledger->stateMap().upper_bound(
uint256(32))->key() ==
643 ledger->stateMap().upper_bound(
uint256(47))->key() ==
646 ledger->stateMap().upper_bound(
uint256(48))->key() ==
649 ledger->stateMap().upper_bound(
uint256(53))->key() ==
652 ledger->stateMap().upper_bound(
uint256(66))->key() ==
655 ledger->stateMap().upper_bound(
uint256(70))->key() ==
658 ledger->stateMap().upper_bound(
uint256(85))->key() ==
661 ledger->stateMap().upper_bound(
uint256(98))->key() ==
663 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(100)) == e);
664 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(155)) == e);
680 env.
app().getNodeFamily());
681 auto const ledger = std::make_shared<Ledger>(
683 auto setup123 = [&ledger,
this]() {
686 ledger->rawInsert(
sle(1));
687 ledger->rawInsert(
sle(2));
688 ledger->rawInsert(
sle(3));
689 BEAST_EXPECT(
sles(*ledger) ==
list(1, 2, 3));
697 BEAST_EXPECT(
sles(view) ==
list(2, 3, 4, 5));
716 BEAST_EXPECT(
sles(view) ==
list(3, 4, 5));
735 BEAST_EXPECT(
sles(view) ==
list(4, 5));
751 BEAST_EXPECT(
sles(view) ==
list(1, 2, 4, 5));
768 BEAST_EXPECT(
sles(view) ==
list(1, 2, 3));
769 BEAST_EXPECT(
seq(view.
read(
k(1))) == 10);
770 BEAST_EXPECT(
seq(view.
read(
k(2))) == 1);
771 BEAST_EXPECT(
seq(view.
read(
k(3))) == 30);
774 BEAST_EXPECT(
sles(view) ==
list(1, 2));
787 BEAST_EXPECT(
sles(view) ==
list(1, 2, 3, 4, 5));
810 auto const alice =
Account(
"alice");
811 auto const bob =
Account(
"bob");
812 auto const carol =
Account(
"carol");
813 auto const gw =
Account(
"gateway");
814 auto const USD = gw[
"USD"];
815 auto const EUR = gw[
"EUR"];
817 env.
fund(
XRP(10000), alice, bob, carol, gw);
819 env.
trust(USD(100), alice, bob, carol);
822 env(
pay(gw, alice, USD(50)));
845 env(
offer(
"alice",
XRP(4), USD(5)));
849 env(
pay(gw, bob, USD(50)));
882 env(
pay(gw, carol, USD(50)));
920 BEAST_EXPECT(carolsXRP ==
XRP(9750));
943 BEAST_EXPECT(gwUSD == USD(314159));
948 BEAST_EXPECT(carolsUSD == USD(50));
955 BEAST_EXPECT(carolsUSD == USD(0));
960 BEAST_EXPECT(carolsUSD == USD(50));
976 auto const gw1 =
Account(
"gw1");
981 auto rdView = env.
closed();
985 env(
rate(gw1, 1.02));
1001 using namespace jtx;
1002 auto const alice =
Account(
"alice");
1003 auto const bob =
Account(
"bob");
1010 auto const rdViewA3 = eA.
closed();
1014 auto const rdViewA4 = eA.
closed();
1022 eB.fund(
XRP(10000), bob);
1024 auto const rdViewB3 = eB.closed();
1026 eB.fund(
XRP(10000), alice);
1028 auto const rdViewB4 = eB.closed();
1032 BEAST_EXPECT(
areCompatible(*rdViewA3, *rdViewA4, jStream,
""));
1033 BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA3, jStream,
""));
1034 BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA4, jStream,
""));
1035 BEAST_EXPECT(!
areCompatible(*rdViewA3, *rdViewB4, jStream,
""));
1036 BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB3, jStream,
""));
1037 BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB4, jStream,
""));
1041 auto const& iA3 = rdViewA3->info();
1042 auto const& iA4 = rdViewA4->info();
1044 BEAST_EXPECT(
areCompatible(iA3.hash, iA3.seq, *rdViewA4, jStream,
""));
1045 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA3, jStream,
""));
1046 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA4, jStream,
""));
1047 BEAST_EXPECT(!
areCompatible(iA3.hash, iA3.seq, *rdViewB4, jStream,
""));
1048 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewB3, jStream,
""));
1049 BEAST_EXPECT(!
areCompatible(iA4.hash, iA4.seq, *rdViewB4, jStream,
""));
1057 using namespace jtx;
1066 std::make_shared<Ledger>(
1070 env.
app().getNodeFamily());
1071 auto const ledger = std::make_shared<Ledger>(
1074 ledger->rawInsert(
sle(1));
1082 BEAST_EXPECT(!v1.
exists(
k(1)));
1098 BEAST_EXPECT(
k(0).key <
k(1).key);
1119 using namespace jtx;
1124 BEAST_EXPECT(majorities.empty());
1128 for (i = 0; i <= 256; ++i)
1132 if (!majorities.empty())
1138 BEAST_EXPECT(i == 254);
1139 BEAST_EXPECT(majorities.size() >= 5);
1143 BEAST_EXPECT(enableds.empty());
1148 for (i = 0; i <= 256; ++i)
1150 using namespace std::chrono_literals;
1153 if (!enableds.empty())
1156 BEAST_EXPECT(i == 255);
1157 BEAST_EXPECT(enableds.size() >= 5);
1168BEAST_DEFINE_TESTSUITE(GetAmendments, ledger,
ripple);
A generic endpoint for log messages.
testcase_t testcase
Memberspace for declaring test cases.
virtual OpenLedger & openLedger()=0
virtual TimeKeeper & timeKeeper()=0
Editable, discardable view that can build metadata for one tx.
void rawErase(std::shared_ptr< SLE > const &sle) override
Delete an existing state item.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
std::optional< uint256 > succ(uint256 const &key, std::optional< uint256 > const &last=std::nullopt) const override
Represents the open ledger.
bool modify(modify_type const &f)
Modify the open ledger.
bool empty() const
Returns true if there are no transactions.
Writable ledger view that accumulates state and tx changes.
std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const override
Return the key of the next state item.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
void rawErase(std::shared_ptr< SLE > const &sle) override
Delete an existing state item.
void rawReplace(std::shared_ptr< SLE > const &sle) override
Unconditionally replace a state item.
void rawInsert(std::shared_ptr< SLE > const &sle) override
Unconditionally insert a state item.
A wrapper which makes credits unavailable to balances.
virtual std::shared_ptr< SLE const > read(Keylet const &k) const =0
Return the state item associated with a key.
NetClock::time_point parentCloseTime() const
Returns the close time of the previous ledger.
virtual std::optional< key_type > succ(key_type const &key, std::optional< key_type > const &last=std::nullopt) const =0
Return the key of the next state item.
virtual bool exists(Keylet const &k) const =0
Determine if a state item exists.
LedgerIndex seq() const
Returns the sequence number of the base ledger.
sles_type sles
Iterable range of ledger state items.
Discardable, editable view to a ledger.
time_point closeTime() const
Returns the predicted close time, in network time.
void erase(std::shared_ptr< SLE > const &sle) override
Remove a peeked SLE.
void update(std::shared_ptr< SLE > const &sle) override
Indicate changes to a peeked SLE.
void insert(std::shared_ptr< SLE > const &sle) override
Insert a new state SLE.
void rawInsert(std::shared_ptr< SLE > const &sle) override
Unconditionally insert a state item.
bool exists(Keylet const &k) const override
Determine if a state item exists.
ApplyFlags flags() const override
Returns the tx apply flags.
std::shared_ptr< SLE const > read(Keylet const &k) const override
Return the state item associated with a key.
std::shared_ptr< SLE > peek(Keylet const &k) override
Prepare to modify the SLE associated with key.
void run() override
Runs the suite.
static std::shared_ptr< SLE > sle(std::uint64_t id, std::uint32_t seq=1)
static void wipe(Ledger &ledger)
static void seq(std::shared_ptr< SLE > const &le, std::uint32_t seq)
void succ(ReadView const &v, std::uint32_t id, std::optional< std::uint32_t > answer)
static Keylet k(std::uint64_t id)
static void wipe(OpenLedger &openLedger)
static std::shared_ptr< std::remove_const_t< T > > copy(std::shared_ptr< T > const &sp)
static std::vector< uint256 > sles(ReadView const &ledger)
void testUpperAndLowerBound()
void run() override
Runs the suite.
static std::uint32_t seq(std::shared_ptr< T > const &le)
static std::vector< uint256 > list(Args... args)
Immutable cryptographic account descriptor.
A transaction testing environment.
std::shared_ptr< ReadView const > closed()
Returns the last closed ledger.
std::shared_ptr< OpenView const > current() const
Returns the current ledger.
bool close(NetClock::time_point closeTime, std::optional< std::chrono::milliseconds > consensusDelay=std::nullopt)
Close and advance the ledger.
void trust(STAmount const &amount, Account const &account)
Establish trust lines.
beast::Journal const journal
void fund(bool setDefaultRipple, STAmount const &amount, Account const &account)
Set the expected result code for a JTx The test will fail if the code doesn't match.
Keylet unchecked(uint256 const &key) noexcept
Any ledger entry.
std::unique_ptr< Config > validator(std::unique_ptr< Config >, std::string const &)
adjust configuration with params needed to be a validator
Json::Value fclear(Account const &account, std::uint32_t off)
Remove account flag.
Json::Value trust(Account const &account, STAmount const &amount, std::uint32_t flags)
Modify a trust line.
Json::Value fset(Account const &account, std::uint32_t on, std::uint32_t off=0)
Add and/or remove flag.
Json::Value pay(AccountID const &account, AccountID const &to, AnyAmount amount)
Create a payment.
std::unique_ptr< Config > envconfig()
creates and initializes a default configuration for jtx::Env
Json::Value rate(Account const &account, double multiplier)
Set a transfer rate.
Json::Value offer(Account const &account, STAmount const &takerPays, STAmount const &takerGets, std::uint32_t flags)
Create an offer.
XRP_t const XRP
Converts to XRP Issue or STAmount.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
constexpr std::uint32_t asfGlobalFreeze
STAmount accountFunds(ReadView const &view, AccountID const &id, STAmount const &saDefault, FreezeHandling freezeHandling, beast::Journal j)
AccountID const & xrpAccount()
Compute AccountID from public key.
Rate transferRate(ReadView const &view, AccountID const &issuer)
Returns IOU issuer transfer fee as Rate.
std::set< uint256 > getEnabledAmendments(ReadView const &view)
@ open
We haven't closed our ledger yet, but others might have.
Currency const & xrpCurrency()
XRP currency.
constexpr std::uint32_t tfClearFreeze
STAmount accountHolds(ReadView const &view, AccountID const &account, Currency const ¤cy, AccountID const &issuer, FreezeHandling zeroIfFrozen, beast::Journal j)
majorityAmendments_t getMajorityAmendments(ReadView const &view)
create_genesis_t const create_genesis
constexpr std::uint32_t tfSetFreeze
bool areCompatible(ReadView const &validLedger, ReadView const &testLedger, beast::Journal::Stream &s, const char *reason)
Return false if the test ledger is provably incompatible with the valid ledger, that is,...
Rate const parityRate
A transfer rate signifying a 1:1 exchange.
A pair of SHAMap key and LedgerEntryType.
Represents a transfer rate.
iterator upper_bound(key_type const &key) const
Set the sequence number on a JTx.