rippled
Loading...
Searching...
No Matches
xrpld
app
ledger
detail
LedgerReplay.cpp
1
#include <xrpld/app/ledger/LedgerReplay.h>
2
3
#include <xrpl/ledger/Ledger.h>
4
5
namespace
xrpl
{
6
7
LedgerReplay::LedgerReplay
(
8
std::shared_ptr<Ledger const>
parent,
9
std::shared_ptr<Ledger const>
replay)
10
: parent_{
std
::move(parent)}, replay_{
std
::move(replay)}
11
{
12
for
(
auto
const
& item :
replay_
->txMap())
13
{
14
auto
txPair =
replay_
->txRead(item.key());
// non-const so can be moved
15
auto
const
txIndex = (*txPair.second)[sfTransactionIndex];
16
orderedTxns_
.emplace(txIndex, std::move(txPair.first));
17
}
18
}
19
20
LedgerReplay::LedgerReplay
(
21
std::shared_ptr<Ledger const>
parent,
22
std::shared_ptr<Ledger const>
replay,
23
std::map
<
std::uint32_t
,
std::shared_ptr<STTx const>
>&& orderedTxns)
24
: parent_{
std
::move(parent)}, replay_{
std
::move(replay)}, orderedTxns_{
std
::move(orderedTxns)}
25
{
26
}
27
28
}
// namespace xrpl
xrpl::LedgerReplay::LedgerReplay
LedgerReplay(std::shared_ptr< Ledger const > parent, std::shared_ptr< Ledger const > replay)
Definition
LedgerReplay.cpp:7
xrpl::LedgerReplay::orderedTxns_
std::map< std::uint32_t, std::shared_ptr< STTx const > > orderedTxns_
Definition
LedgerReplay.h:18
xrpl::LedgerReplay::replay_
std::shared_ptr< Ledger const > replay_
Definition
LedgerReplay.h:17
std::uint32_t
std::map
std
STL namespace.
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
std::shared_ptr
Generated by
1.9.8