rippled
Loading...
Searching...
No Matches
AcceptedLedger.cpp
1#include <xrpld/app/ledger/AcceptedLedger.h>
2
3#include <algorithm>
4
5namespace xrpl {
6
8{
9 transactions_.reserve(256);
10
11 auto insertAll = [&](auto const& txns) {
12 for (auto const& item : txns)
13 {
14 transactions_.emplace_back(
15 std::make_unique<AcceptedLedgerTx>(ledger, item.first, item.second));
16 }
17 };
18
19 transactions_.reserve(256);
20 insertAll(ledger->txs);
21
22 std::sort(transactions_.begin(), transactions_.end(), [](auto const& a, auto const& b) {
23 return a->getTxnSeq() < b->getTxnSeq();
24 });
25}
26
27} // namespace xrpl
std::vector< std::unique_ptr< AcceptedLedgerTx > > transactions_
AcceptedLedger(std::shared_ptr< ReadView const > const &ledger)
T is_same_v
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
T sort(T... args)