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