rippled
Loading...
Searching...
No Matches
xrpld
app
ledger
AcceptedLedger.cpp
1
#include <xrpld/app/ledger/AcceptedLedger.h>
2
3
#include <
algorithm
>
4
5
namespace
xrpl
{
6
7
AcceptedLedger::AcceptedLedger
(
std::shared_ptr<ReadView const>
const
& ledger,
Application
& app) : mLedger(ledger)
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
algorithm
xrpl::AcceptedLedger::transactions_
std::vector< std::unique_ptr< AcceptedLedgerTx > > transactions_
Definition
AcceptedLedger.h:54
xrpl::AcceptedLedger::AcceptedLedger
AcceptedLedger(std::shared_ptr< ReadView const > const &ledger, Application &app)
Definition
AcceptedLedger.cpp:7
xrpl::Application
Definition
Application.h:95
std::is_same_v
T is_same_v
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
std::shared_ptr
std::sort
T sort(T... args)
Generated by
1.9.8