xrpld
Loading...
Searching...
No Matches
BridgeEntry.h
1#pragma once
2
3#include <xrpl/beast/utility/Journal.h>
4#include <xrpl/ledger/ApplyView.h>
5#include <xrpl/ledger/ReadView.h>
6#include <xrpl/ledger/entries/SLEBase.h>
7#include <xrpl/protocol/Indexes.h>
8#include <xrpl/protocol/LedgerFormats.h>
9#include <xrpl/protocol/STXChainBridge.h>
10
11namespace xrpl {
12
13template <typename ViewT>
14class BridgeEntry : public SLEBase<ViewT, ltBRIDGE>
15{
16public:
18
19 // Inherit base constructors: adopt an existing SLE, or resolve one from a
20 // Keylet against the view.
21 using Base::Base;
22
23 explicit BridgeEntry(
24 STXChainBridge const& bridge,
28 : Base(keylet::bridge(bridge, chainType), view, j)
29 {
30 }
31};
32
35
36} // namespace xrpl
A generic endpoint for log messages.
Definition Journal.h:44
static Sink & getNullSink()
Returns a Sink which does nothing.
BridgeEntry(STXChainBridge const &bridge, STXChainBridge::ChainType chainType, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition BridgeEntry.h:23
SLEBase< ViewT, ltBRIDGE > Base
Definition BridgeEntry.h:17
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition SLEBase.h:106
SLEBase(SLEBase const &)=default
Keylet computation functions.
Definition Indexes.h:40
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:5
BridgeEntry< ReadView > BridgeEntryR
Definition BridgeEntry.h:33
BridgeEntry< ApplyView > BridgeEntryW
Definition BridgeEntry.h:34