20 #include <ripple/basics/contract.h>
21 #include <ripple/ledger/TxMeta.h>
22 #include <ripple/basics/Log.h>
23 #include <ripple/json/to_string.h>
24 #include <ripple/protocol/STAccount.h>
34 : mTransactionID (txid)
50 : mTransactionID (txid)
57 auto affectedNodes =
dynamic_cast <STArray const*
>
59 assert (affectedNodes);
83 for (
auto const& n :
mNodes)
114 boost::container::flat_set<AccountID>
117 boost::container::flat_set<AccountID> list;
122 for (
auto const& it :
mNodes)
128 const STObject* inner =
dynamic_cast<const STObject*
> (&it.peekAtIndex (index));
132 for (
auto const& field : *inner)
134 if (
auto sa =
dynamic_cast<STAccount const*
> (&field))
136 assert (! sa->isDefault());
137 if (! sa->isDefault())
138 list.insert(sa->value());
149 if (issuer.isNonZero ())
154 JLOG (j.
fatal()) <<
"limit is not amount "
192 Throw<std::runtime_error> (
"Affected node not found");
198 for (
auto const& n :
mNodes)
204 Throw<std::runtime_error> (
"Affected node not found");
218 assert ((mTransactionID == s.mTransactionID) && (mLedger == s.mLedger));
219 mNodes.swap (s.mNodes);
std::enable_if_t< std::is_same< T, char >::value||std::is_same< T, unsigned char >::value, Slice > makeSlice(std::array< T, N > const &a)
const SF_U32 sfTransactionIndex(access, STI_UINT32, 28, "TransactionIndex")
void setFieldU16(SField const &field, std::uint16_t)
const SF_U32 sfPreviousTxnLgrSeq(access, STI_UINT32, 5, "PreviousTxnLgrSeq", SField::sMD_DeleteFinal)
const SF_U16 sfLedgerEntryType(access, STI_UINT16, 1, "LedgerEntryType", SField::sMD_Never)
const SF_U256 sfLedgerIndex(access, STI_HASH256, 6, "LedgerIndex")
const SField sfMetadata(access, STI_METADATA, 257, "Metadata")
const SF_Amount sfDeliveredAmount(access, STI_AMOUNT, 18, "DeliveredAmount")
unsigned char getFieldU8(SField const &field) const
const SField sfNewFields(access, STI_OBJECT, 8, "NewFields")
const SF_Amount sfTakerPays(access, STI_AMOUNT, 4, "TakerPays")
void push_back(STObject const &object)
constexpr TERUnderlyingType TERtoInt(TELcodes v)
const SField sfFinalFields(access, STI_OBJECT, 7, "FinalFields")
const SF_Amount sfHighLimit(access, STI_AMOUNT, 7, "HighLimit")
const SF_Amount sfLowLimit(access, STI_AMOUNT, 6, "LowLimit")
void setFieldU8(SField const &field, unsigned char)
void setFieldAmount(SField const &field, STAmount const &)
int compare(base_uint< Bits, Tag > const &a, base_uint< Bits, Tag > const &b)
void setFieldH256(SField const &field, uint256 const &)
const SField sfTransactionMetaData(access, STI_OBJECT, 2, "TransactionMetaData")
A generic endpoint for log messages.
const SField sfCreatedNode(access, STI_OBJECT, 3, "CreatedNode")
void sort(bool(*compare)(const STObject &o1, const STObject &o2))
AccountID const & getIssuer() const
SField const & getFName() const
int getFieldIndex(SField const &field) const
std::size_t emplace_back(Args &&... args)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
const STBase * peekAtPField(SField const &field) const
virtual void add(Serializer &s) const override
STBase & getField(SField const &field)
const SField sfAffectedNodes(access, STI_ARRAY, 8, "AffectedNodes")
bool isFieldPresent(SField const &field) const
const SF_U8 sfTransactionResult(access, STI_UINT8, 3, "TransactionResult")
const SF_Amount sfTakerGets(access, STI_AMOUNT, 5, "TakerGets")
std::uint32_t getFieldU32(SField const &field) const
void setFieldU32(SField const &field, std::uint32_t)
STAmount const & getFieldAmount(SField const &field) const
const SF_U256 sfPreviousTxnID(access, STI_HASH256, 5, "PreviousTxnID", SField::sMD_DeleteFinal)
uint256 getFieldH256(SField const &field) const