xrpld
Loading...
Searching...
No Matches
LoanInvariant.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/ReadView.h>
5#include <xrpl/protocol/STLedgerEntry.h>
6#include <xrpl/protocol/STTx.h>
7#include <xrpl/protocol/TER.h>
8#include <xrpl/protocol/XRPAmount.h>
9
10#include <utility>
11#include <vector>
12
13namespace xrpl {
14
50{
51 // Pair is <before, after>. After is used for most of the checks, except
52 // those that check changed values.
54 // Loans removed from the ledger, in the same <before, after> form as loans_.
55 // Note that `after` holds the erased entry, so it is not null.
57
58public:
59 void
61
62 bool
63 finalize(STTx const&, TER const, XRPAmount const, ReadView const&, beast::Journal const&);
64};
65
66} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
A view into a ledger.
Definition ReadView.h:41
std::shared_ptr< STLedgerEntry const > const & ConstRef
Invariants: Loans are internally consistent.
void visitEntry(bool, SLE::ConstRef, SLE::ConstRef)
std::vector< std::pair< SLE::const_pointer, SLE::const_pointer > > deletedLoans_
std::vector< std::pair< SLE::const_pointer, SLE::const_pointer > > loans_
bool finalize(STTx const &, TER const, XRPAmount const, ReadView const &, beast::Journal const &)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
TERSubset< CanCvtToTER > TER
Definition TER.h:654