rippled
Loading...
Searching...
No Matches
xrpld
app
ledger
detail
LedgerReplay.cpp
1
#include <xrpld/app/ledger/Ledger.h>
2
#include <xrpld/app/ledger/LedgerReplay.h>
3
4
namespace
xrpl
{
5
6
LedgerReplay::LedgerReplay
(
std::shared_ptr<Ledger const>
parent,
std::shared_ptr<Ledger const>
replay)
7
: parent_{
std
::move(parent)}, replay_{
std
::move(replay)}
8
{
9
for
(
auto
const
& item :
replay_
->txMap())
10
{
11
auto
txPair =
replay_
->txRead(item.key());
// non-const so can be moved
12
auto
const
txIndex = (*txPair.second)[sfTransactionIndex];
13
orderedTxns_
.emplace(txIndex, std::move(txPair.first));
14
}
15
}
16
17
LedgerReplay::LedgerReplay
(
18
std::shared_ptr<Ledger const>
parent,
19
std::shared_ptr<Ledger const>
replay,
20
std::map
<
std::uint32_t
,
std::shared_ptr<STTx const>
>&& orderedTxns)
21
: parent_{
std
::move(parent)}, replay_{
std
::move(replay)}, orderedTxns_{
std
::move(orderedTxns)}
22
{
23
}
24
25
}
// namespace xrpl
xrpl::LedgerReplay::LedgerReplay
LedgerReplay(std::shared_ptr< Ledger const > parent, std::shared_ptr< Ledger const > replay)
Definition
LedgerReplay.cpp:6
xrpl::LedgerReplay::orderedTxns_
std::map< std::uint32_t, std::shared_ptr< STTx const > > orderedTxns_
Definition
LedgerReplay.h:17
xrpl::LedgerReplay::replay_
std::shared_ptr< Ledger const > replay_
Definition
LedgerReplay.h:16
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