20 #include <ripple/basics/Log.h>
21 #include <ripple/basics/contract.h>
22 #include <ripple/basics/safe_cast.h>
23 #include <ripple/json/to_string.h>
24 #include <ripple/protocol/Indexes.h>
25 #include <ripple/protocol/STLedgerEntry.h>
26 #include <ripple/protocol/jss.h>
27 #include <boost/format.hpp>
37 if (format ==
nullptr)
38 Throw<std::runtime_error>(
39 "Attempt to create a SLE of unknown type " +
42 set(format->getSOTemplate());
66 if (format ==
nullptr)
67 Throw<std::runtime_error>(
"invalid ledger entry type");
69 type_ = format->getType();
78 if (format ==
nullptr)
79 Throw<std::runtime_error>(
"invalid ledger entry type");
84 ret += format->getName();
100 return emplace(n, buf, std::move(*
this));
141 JLOG(
debugLog().info()) <<
"Thread Tx:" << txID <<
" prev:" << oldPrevTxID;
143 if (oldPrevTxID == txID)
150 prevTxID = oldPrevTxID;
STBase * move(std::size_t n, void *buf) override
const SF_UINT32 sfPreviousTxnLgrSeq
void applyTemplate(const SOTemplate &type)
A pair of SHAMap key and LedgerEntryType.
Json::Value getJson(JsonOptions options) const override
void setFieldU16(SField const &field, std::uint16_t)
std::string getFullText() const override
beast::Journal debugLog()
Returns a debug journal.
const SField sfLedgerEntry
std::string getFullText() const override
static STBase * emplace(std::size_t n, void *buf, T &&val)
void setFieldH256(SField const &field, uint256 const &)
std::string getText() const override
STLedgerEntry(Keylet const &k)
Create an empty object with the given key and type.
const SF_UINT256 sfPreviousTxnID
std::uint16_t getFieldU16(SField const &field) const
int getFieldIndex(SField const &field) const
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const SF_UINT16 sfLedgerEntryType
bool thread(uint256 const &txID, std::uint32_t ledgerSeq, uint256 &prevTxID, std::uint32_t &prevLedgerID)
A type which can be exported to a well known binary format.
std::string to_string(Manifest const &m)
Format the specified manifest to a string for debugging purposes.
SerializedTypeID getSType() const override
std::uint32_t getFieldU32(SField const &field) const
STBase * copy(std::size_t n, void *buf) const override
bool isThreadedType() const
Json::Value getJson(JsonOptions options) const override
void set(const SOTemplate &)
void setFieldU32(SField const &field, std::uint32_t)
std::string getText() const override
uint256 getFieldH256(SField const &field) const