xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
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
11
namespace
xrpl
{
12
13
template
<
typename
ViewT>
14
class
BridgeEntry
:
public
SLEBase
<ViewT, ltBRIDGE>
15
{
16
public
:
17
using
Base
=
SLEBase<ViewT, ltBRIDGE>
;
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,
25
STXChainBridge::ChainType
chainType,
26
Base::ViewRefType
view,
27
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
28
: Base(
keylet
::bridge(bridge, chainType), view, j)
29
{
30
}
31
};
32
33
using
BridgeEntryR
=
BridgeEntry<ReadView>
;
34
using
BridgeEntryW
=
BridgeEntry<ApplyView>
;
35
36
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
beast::Journal::getNullSink
static Sink & getNullSink()
Returns a Sink which does nothing.
Definition
beast_Journal.cpp:63
xrpl::BridgeEntry
Definition
BridgeEntry.h:15
xrpl::BridgeEntry::BridgeEntry
BridgeEntry(STXChainBridge const &bridge, STXChainBridge::ChainType chainType, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
BridgeEntry.h:23
xrpl::BridgeEntry::Base
SLEBase< ViewT, ltBRIDGE > Base
Definition
BridgeEntry.h:17
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltBRIDGE >::SLEBase
SLEBase(SLEBase const &)=default
xrpl::STXChainBridge
Definition
STXChainBridge.h:24
xrpl::STXChainBridge::ChainType
ChainType
Definition
STXChainBridge.h:33
xrpl::keylet
Keylet computation functions.
Definition
Indexes.h:40
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::BridgeEntryR
BridgeEntry< ReadView > BridgeEntryR
Definition
BridgeEntry.h:33
xrpl::BridgeEntryW
BridgeEntry< ApplyView > BridgeEntryW
Definition
BridgeEntry.h:34
Generated by
1.17.0