21#include <xrpld/app/ledger/Ledger.h>
22#include <xrpld/ledger/View.h>
23#include <xrpl/basics/Log.h>
24#include <xrpl/beast/unit_test.h>
38 auto prev = std::make_shared<Ledger>(
42 env.
app().getNodeFamily());
44 for (
auto i = 0; i < 1023; ++i)
46 auto next = std::make_shared<Ledger>(
48 next->updateSkipList();
56 BEAST_EXPECT((*
std::begin(history))->info().seq < l->info().
seq);
63 l->info().parentHash);
69 for (
auto i = history.
crbegin(); i != history.
crend(); i += 256)
72 n !=
std::next(i, (*i)->info().seq - 256 > 1 ? 257 : 256);
105BEAST_DEFINE_TESTSUITE(SkipList, ledger,
ripple);
virtual TimeKeeper & timeKeeper()=0
time_point closeTime() const
Returns the predicted close time, in network time.
void run() override
Runs the suite.
A transaction testing environment.
beast::Journal const journal
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
std::optional< uint256 > hashOfSeq(ReadView const &ledger, LedgerIndex seq, beast::Journal journal)
Return the hash of a ledger by sequence.
create_genesis_t const create_genesis
Set the sequence number on a JTx.