rippled
Loading...
Searching...
No Matches
LedgerReplay.cpp
1#include <xrpld/app/ledger/LedgerReplay.h>
2
3#include <xrpl/ledger/Ledger.h>
4
5namespace xrpl {
6
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
24 : parent_{std::move(parent)}, replay_{std::move(replay)}, orderedTxns_{std::move(orderedTxns)}
25{
26}
27
28} // namespace xrpl
LedgerReplay(std::shared_ptr< Ledger const > parent, std::shared_ptr< Ledger const > replay)
std::map< std::uint32_t, std::shared_ptr< STTx const > > orderedTxns_
std::shared_ptr< Ledger const > replay_
STL namespace.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5