xrpld
Loading...
Searching...
No Matches
CosignerInvariant.h
1#pragma once
2
3#include <xrpl/basics/base_uint.h>
4#include <xrpl/beast/utility/Journal.h>
5#include <xrpl/protocol/Keylet.h>
6#include <xrpl/protocol/STLedgerEntry.h>
7#include <xrpl/protocol/STTx.h>
8#include <xrpl/protocol/TER.h>
9#include <xrpl/protocol/XRPAmount.h>
10
11#include <cstdint>
12#include <set>
13#include <vector>
14
15namespace xrpl {
16
17class ReadView;
18
30{
31 // The Ticket each deleted proposal was keyed to; a proposal may go with
32 // its Ticket, or by Cancel, and no other way.
34 // The proposal each deleted Ticket was keyed to, whether or not one
35 // existed; none may survive its Ticket.
42
43public:
44 void
45 visitEntry(bool isDelete, SLE::ConstRef before, SLE::ConstRef after);
46
47 [[nodiscard]] bool
48 finalize(STTx const& tx, TER result, XRPAmount, ReadView const& view, beast::Journal const& j)
49 const;
50};
51
52} // 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 for TransactionProposal ledger entries.
std::set< uint256 > deletedTickets_
std::vector< uint256 > ticketsOfDeletedProposals_
bool finalize(STTx const &tx, TER result, XRPAmount, ReadView const &view, beast::Journal const &j) const
void visitEntry(bool isDelete, SLE::ConstRef before, SLE::ConstRef after)
std::vector< Keylet > proposalsOfDeletedTickets_
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
Definition View.cpp:668
TERSubset< CanCvtToTER > TER
Definition TER.h:657