20 #include <ripple/app/ledger/Ledger.h>
21 #include <ripple/basics/Log.h>
22 #include <ripple/ledger/View.h>
23 #include <ripple/beast/unit_test.h>
38 auto prev = std::make_shared<Ledger>(
42 for (
auto i = 0; i < 1023; ++i)
44 auto next = std::make_shared<Ledger>(
47 next->updateSkipList();
57 BEAST_EXPECT(
hashOfSeq(*l, l->info().seq + 1,
60 env.
journal) == l->info().hash);
61 BEAST_EXPECT(
hashOfSeq(*l, l->info().seq - 1,
62 env.
journal) == l->info().parentHash);
64 l->info().seq, env.
journal) == boost::none);
68 for (
auto i = history.
crbegin();
69 i != history.
crend(); i += 256)
73 (*i)->info().seq - 256 > 1 ? 257 : 256);
77 (*n)->info().seq, env.
journal) ==
83 (*i)->info().seq - 258, env.
journal) ==
88 for (
auto i = history.
crbegin();
97 (*n)->info().seq, env.
journal) ==
BEAST_DEFINE_TESTSUITE(AccountDelete, app, ripple)
const beast::Journal journal
virtual TimeKeeper & timeKeeper()=0
virtual time_point closeTime() const =0
Returns the close time, in network time.
boost::optional< uint256 > hashOfSeq(ReadView const &ledger, LedgerIndex seq, beast::Journal journal)
Return the hash of a ledger by sequence.
Set the sequence number on a JTx.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const create_genesis_t create_genesis
A transaction testing environment.