rippled
Loading...
Searching...
No Matches
LedgerReplay.cpp
1#include <xrpld/app/ledger/Ledger.h>
2#include <xrpld/app/ledger/LedgerReplay.h>
3
4namespace xrpl {
5
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
21 : parent_{std::move(parent)}, replay_{std::move(replay)}, orderedTxns_{std::move(orderedTxns)}
22{
23}
24
25} // 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