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