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 transactions_.emplace_back(std::make_unique<AcceptedLedgerTx>(ledger, item.first, item.second));
14 };
15
16 transactions_.reserve(256);
17 insertAll(ledger->txs);
18
19 std::sort(transactions_.begin(), transactions_.end(), [](auto const& a, auto const& b) {
20 return a->getTxnSeq() < b->getTxnSeq();
21 });
22}
23
24} // namespace xrpl
std::vector< std::unique_ptr< AcceptedLedgerTx > > transactions_
AcceptedLedger(std::shared_ptr< ReadView const > const &ledger, Application &app)
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)