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