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