rippled
Loading...
Searching...
No Matches
AcceptedLedger.h
1#ifndef XRPL_APP_LEDGER_ACCEPTEDLEDGER_H_INCLUDED
2#define XRPL_APP_LEDGER_ACCEPTEDLEDGER_H_INCLUDED
3
4#include <xrpld/app/ledger/AcceptedLedgerTx.h>
5
6namespace ripple {
7
16/* VFALCO TODO digest this terminology clarification:
17 Closed and accepted refer to ledgers that have not passed the
18 validation threshold yet. Once they pass the threshold, they are
19 "Validated". Closed just means its close time has passed and no
20 new transactions can get in. "Accepted" means we believe it to be
21 the result of the a consensus process (though haven't validated
22 it yet).
23*/
24class AcceptedLedger : public CountedObject<AcceptedLedger>
25{
26public:
29 Application& app);
30
32 getLedger() const
33 {
34 return mLedger;
35 }
36
38 size() const
39 {
40 return transactions_.size();
41 }
42
43 auto
44 begin() const
45 {
46 return transactions_.begin();
47 }
48
49 auto
50 end() const
51 {
52 return transactions_.end();
53 }
54
55private:
58};
59
60} // namespace ripple
61
62#endif
A ledger that has become irrevocable.
std::vector< std::unique_ptr< AcceptedLedgerTx > > transactions_
std::shared_ptr< ReadView const > mLedger
std::shared_ptr< ReadView const > const & getLedger() const
std::size_t size() const
Tracks the number of instances of an object.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6