21#include <xrpld/app/ledger/Ledger.h>
22#include <xrpld/core/ConfigSections.h>
23#include <xrpld/ledger/ApplyViewImpl.h>
24#include <xrpld/ledger/OpenView.h>
25#include <xrpld/ledger/PaymentSandbox.h>
26#include <xrpld/ledger/Sandbox.h>
27#include <xrpl/protocol/Feature.h>
28#include <xrpl/protocol/Protocol.h>
47 auto const le = std::make_shared<SLE>(
k(
id));
48 le->setFieldU32(sfSequence,
seq);
57 return le->getFieldU32(sfSequence);
64 le->setFieldU32(sfSequence,
seq);
77 next = view.
succ(*next);
95 next = ledger.
succ(*next);
110 auto const next = v.
succ(
k(
id).key);
113 if (BEAST_EXPECT(next))
114 BEAST_EXPECT(*next ==
k(*answer).
key);
126 return std::make_shared<std::remove_const_t<T>>(*sp);
142 env.
app().getNodeFamily());
143 auto const ledger = std::make_shared<Ledger>(
147 succ(v, 0, std::nullopt);
148 ledger->rawInsert(
sle(1, 1));
150 BEAST_EXPECT(
seq(v.
read(
k(1))) == 1);
152 succ(v, 1, std::nullopt);
153 ledger->rawInsert(
sle(2, 2));
154 BEAST_EXPECT(
seq(v.
read(
k(2))) == 2);
155 ledger->rawInsert(
sle(3, 3));
156 BEAST_EXPECT(
seq(v.
read(
k(3))) == 3);
159 ledger->rawReplace(s);
160 BEAST_EXPECT(
seq(v.
read(
k(2))) == 4);
161 ledger->rawErase(
sle(2));
177 succ(v, 0, std::nullopt);
180 BEAST_EXPECT(
seq(v.
read(
k(1))) == 1);
181 BEAST_EXPECT(
seq(v.
peek(
k(1))) == 1);
183 succ(v, 1, std::nullopt);
185 BEAST_EXPECT(
seq(v.
read(
k(2))) == 2);
187 auto s = v.
peek(
k(3));
188 BEAST_EXPECT(
seq(s) == 3);
192 BEAST_EXPECT(
seq(v.
read(
k(2))) == 4);
230 succ(v0, 7, std::nullopt);
239 succ(v1, 7, std::nullopt);
263 succ(v0, 7, std::nullopt);
284 auto s = v1.
peek(
k(4));
287 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
288 BEAST_EXPECT(!v1.
exists(
k(2)));
289 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 3);
290 BEAST_EXPECT(
seq(v1.
read(
k(4))) == 5);
293 auto s2 = v2.
peek(
k(3));
297 BEAST_EXPECT(
seq(v2.
read(
k(1))) == 1);
298 BEAST_EXPECT(!v2.
exists(
k(2)));
299 BEAST_EXPECT(
seq(v2.
read(
k(3))) == 6);
300 BEAST_EXPECT(!v2.
exists(
k(4)));
303 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
304 BEAST_EXPECT(!v1.
exists(
k(2)));
305 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 3);
306 BEAST_EXPECT(
seq(v1.
read(
k(4))) == 5);
310 auto s2 = v2.
peek(
k(3));
314 BEAST_EXPECT(
seq(v2.
read(
k(1))) == 1);
315 BEAST_EXPECT(!v2.
exists(
k(2)));
316 BEAST_EXPECT(
seq(v2.
read(
k(3))) == 6);
317 BEAST_EXPECT(!v2.
exists(
k(4)));
320 BEAST_EXPECT(
seq(v1.
read(
k(1))) == 1);
321 BEAST_EXPECT(!v1.
exists(
k(2)));
322 BEAST_EXPECT(
seq(v1.
read(
k(3))) == 6);
323 BEAST_EXPECT(!v1.
exists(
k(4)));
326 BEAST_EXPECT(
seq(v0.
read(
k(1))) == 1);
327 BEAST_EXPECT(!v0.
exists(
k(2)));
328 BEAST_EXPECT(
seq(v0.
read(
k(3))) == 6);
329 BEAST_EXPECT(!v0.
exists(
k(4)));
345 BEAST_EXPECT(v0.
seq() != 98);
346 BEAST_EXPECT(v0.
seq() ==
open->seq());
352 BEAST_EXPECT(v1.
seq() == v0.
seq());
357 BEAST_EXPECT(v2.
seq() == v1.
seq());
361 BEAST_EXPECT(v3.
seq() == v2.
seq());
368 BEAST_EXPECT(v2.
seq() == v0.
seq());
372 BEAST_EXPECT(v3.
seq() == v2.
seq());
385 for (
auto const&
sle : ledger.
sles)
390 template <
class... Args>
409 env.
app().getNodeFamily());
410 auto const ledger = std::make_shared<Ledger>(
417 ledger->rawInsert(
sle(x));
422 BEAST_EXPECT(
sles(*ledger) ==
list(1, 2, 3));
423 auto e = ledger->stateMap().end();
424 auto b1 = ledger->stateMap().begin();
425 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
426 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == b1);
428 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
430 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
431 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
432 b1 = ledger->stateMap().begin();
433 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b1);
435 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
437 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
438 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == e);
443 BEAST_EXPECT(
sles(*ledger) ==
list(2, 4, 6));
444 auto e = ledger->stateMap().end();
445 auto b1 = ledger->stateMap().begin();
446 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
447 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
448 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b1);
449 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b1);
451 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b1);
452 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b1);
454 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b1);
455 b1 = ledger->stateMap().begin();
456 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b1);
458 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b1);
459 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b1);
462 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b1);
463 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b1);
464 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == e);
465 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == e);
468 setup({2, 3, 5, 6, 10, 15});
469 BEAST_EXPECT(
sles(*ledger) ==
list(2, 3, 5, 6, 10, 15));
470 auto e = ledger->stateMap().end();
471 auto b = ledger->stateMap().begin();
472 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == e);
473 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(2)) == e);
474 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(3)) == b);
476 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(4)) == b);
477 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(5)) == b);
479 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(6)) == b);
481 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(7)) == b);
482 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(8)) == b);
483 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(9)) == b);
484 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(10)) == b);
486 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(11)) == b);
487 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(12)) == b);
488 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(13)) == b);
489 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(14)) == b);
490 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(15)) == b);
492 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(16)) == b);
493 b = ledger->stateMap().begin();
494 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(0)) == b);
495 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(1)) == b);
497 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(2)) == b);
499 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(3)) == b);
500 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(4)) == b);
502 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(5)) == b);
504 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(6)) == b);
505 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(7)) == b);
506 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(8)) == b);
507 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(9)) == b);
509 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(10)) == b);
510 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(11)) == b);
511 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(12)) == b);
512 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(13)) == b);
513 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(14)) == b);
515 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(15)) == e);
516 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(16)) == e);
520 setup({0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
521 13, 14, 15, 16, 20, 25, 30, 32, 33, 34, 35, 36, 37,
522 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 66, 100});
565 auto b = ledger->stateMap().begin();
566 auto e = ledger->stateMap().end();
567 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(0)) == e);
568 BEAST_EXPECT(ledger->stateMap().lower_bound(
uint256(1)) == b);
570 ledger->stateMap().lower_bound(
uint256(5))->key() ==
573 ledger->stateMap().lower_bound(
uint256(15))->key() ==
576 ledger->stateMap().lower_bound(
uint256(16))->key() ==
579 ledger->stateMap().lower_bound(
uint256(19))->key() ==
582 ledger->stateMap().lower_bound(
uint256(20))->key() ==
585 ledger->stateMap().lower_bound(
uint256(24))->key() ==
588 ledger->stateMap().lower_bound(
uint256(31))->key() ==
591 ledger->stateMap().lower_bound(
uint256(32))->key() ==
594 ledger->stateMap().lower_bound(
uint256(40))->key() ==
597 ledger->stateMap().lower_bound(
uint256(47))->key() ==
600 ledger->stateMap().lower_bound(
uint256(48))->key() ==
603 ledger->stateMap().lower_bound(
uint256(64))->key() ==
607 ledger->stateMap().lower_bound(
uint256(90))->key() ==
610 ledger->stateMap().lower_bound(
uint256(96))->key() ==
613 ledger->stateMap().lower_bound(
uint256(100))->key() ==
617 ledger->stateMap().upper_bound(
uint256(0))->key() ==
620 ledger->stateMap().upper_bound(
uint256(5))->key() ==
623 ledger->stateMap().upper_bound(
uint256(15))->key() ==
626 ledger->stateMap().upper_bound(
uint256(16))->key() ==
629 ledger->stateMap().upper_bound(
uint256(18))->key() ==
632 ledger->stateMap().upper_bound(
uint256(20))->key() ==
635 ledger->stateMap().upper_bound(
uint256(31))->key() ==
638 ledger->stateMap().upper_bound(
uint256(32))->key() ==
641 ledger->stateMap().upper_bound(
uint256(47))->key() ==
644 ledger->stateMap().upper_bound(
uint256(48))->key() ==
647 ledger->stateMap().upper_bound(
uint256(53))->key() ==
650 ledger->stateMap().upper_bound(
uint256(66))->key() ==
653 ledger->stateMap().upper_bound(
uint256(70))->key() ==
656 ledger->stateMap().upper_bound(
uint256(85))->key() ==
659 ledger->stateMap().upper_bound(
uint256(98))->key() ==
661 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(100)) == e);
662 BEAST_EXPECT(ledger->stateMap().upper_bound(
uint256(155)) == e);
678 env.
app().getNodeFamily());
679 auto const ledger = std::make_shared<Ledger>(
681 auto setup123 = [&ledger,
this]() {
684 ledger->rawInsert(
sle(1));
685 ledger->rawInsert(
sle(2));
686 ledger->rawInsert(
sle(3));
687 BEAST_EXPECT(
sles(*ledger) ==
list(1, 2, 3));
695 BEAST_EXPECT(
sles(view) ==
list(2, 3, 4, 5));
714 BEAST_EXPECT(
sles(view) ==
list(3, 4, 5));
733 BEAST_EXPECT(
sles(view) ==
list(4, 5));
749 BEAST_EXPECT(
sles(view) ==
list(1, 2, 4, 5));
766 BEAST_EXPECT(
sles(view) ==
list(1, 2, 3));
767 BEAST_EXPECT(
seq(view.
read(
k(1))) == 10);
768 BEAST_EXPECT(
seq(view.
read(
k(2))) == 1);
769 BEAST_EXPECT(
seq(view.
read(
k(3))) == 30);
772 BEAST_EXPECT(
sles(view) ==
list(1, 2));
785 BEAST_EXPECT(
sles(view) ==
list(1, 2, 3, 4, 5));
808 auto const alice =
Account(
"alice");
809 auto const bob =
Account(
"bob");
810 auto const carol =
Account(
"carol");
811 auto const gw =
Account(
"gateway");
812 auto const USD = gw[
"USD"];
813 auto const EUR = gw[
"EUR"];
815 env.
fund(
XRP(10000), alice, bob, carol, gw);
816 env.
trust(USD(100), alice, bob, carol);
819 env(
pay(gw, alice, USD(50)));
842 env(
offer(
"alice",
XRP(4), USD(5)));
846 env(
pay(gw, bob, USD(50)));
879 env(
pay(gw, carol, USD(50)));
917 BEAST_EXPECT(carolsXRP ==
XRP(9750));
940 BEAST_EXPECT(gwUSD == USD(314159));
945 BEAST_EXPECT(carolsUSD == USD(50));
952 BEAST_EXPECT(carolsUSD == USD(0));
957 BEAST_EXPECT(carolsUSD == USD(50));
973 auto const gw1 =
Account(
"gw1");
978 auto rdView = env.
closed();
982 env(
rate(gw1, 1.02));
999 auto const alice =
Account(
"alice");
1000 auto const bob =
Account(
"bob");
1007 auto const rdViewA3 = eA.
closed();
1011 auto const rdViewA4 = eA.
closed();
1019 eB.fund(
XRP(10000), bob);
1021 auto const rdViewB3 = eB.closed();
1023 eB.fund(
XRP(10000), alice);
1025 auto const rdViewB4 = eB.closed();
1029 BEAST_EXPECT(
areCompatible(*rdViewA3, *rdViewA4, jStream,
""));
1030 BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA3, jStream,
""));
1031 BEAST_EXPECT(
areCompatible(*rdViewA4, *rdViewA4, jStream,
""));
1032 BEAST_EXPECT(!
areCompatible(*rdViewA3, *rdViewB4, jStream,
""));
1033 BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB3, jStream,
""));
1034 BEAST_EXPECT(!
areCompatible(*rdViewA4, *rdViewB4, jStream,
""));
1038 auto const& iA3 = rdViewA3->info();
1039 auto const& iA4 = rdViewA4->info();
1041 BEAST_EXPECT(
areCompatible(iA3.hash, iA3.seq, *rdViewA4, jStream,
""));
1042 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA3, jStream,
""));
1043 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewA4, jStream,
""));
1044 BEAST_EXPECT(!
areCompatible(iA3.hash, iA3.seq, *rdViewB4, jStream,
""));
1045 BEAST_EXPECT(
areCompatible(iA4.hash, iA4.seq, *rdViewB3, jStream,
""));
1046 BEAST_EXPECT(!
areCompatible(iA4.hash, iA4.seq, *rdViewB4, jStream,
""));
1054 using namespace jtx;
1063 std::make_shared<Ledger>(
1067 env.
app().getNodeFamily());
1068 auto const ledger = std::make_shared<Ledger>(
1071 ledger->rawInsert(
sle(1));
1079 BEAST_EXPECT(!v1.
exists(
k(1)));
1095 BEAST_EXPECT(
k(0).key <
k(1).key);
1116 using namespace jtx;
1121 BEAST_EXPECT(majorities.empty());
1125 for (i = 0; i <= 256; ++i)
1129 if (!majorities.empty())
1135 BEAST_EXPECT(i == 254);
1136 BEAST_EXPECT(majorities.size() >= 5);
1140 BEAST_EXPECT(enableds.empty());
1145 for (i = 0; i <= 256; ++i)
1147 using namespace std::chrono_literals;
1150 if (!enableds.empty())
1153 BEAST_EXPECT(i == 255);
1154 BEAST_EXPECT(enableds.size() >= 5);
1165BEAST_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 noop(Account const &account)
The null transaction.
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.