20 #include <ripple/basics/Log.h>
21 #include <ripple/basics/contract.h>
22 #include <ripple/json/to_string.h>
23 #include <ripple/ledger/TxMeta.h>
24 #include <ripple/protocol/STAccount.h>
51 : mTransactionID(txid)
60 assert(affectedNodes);
84 for (
auto const& n :
mNodes)
118 boost::container::flat_set<AccountID>
121 boost::container::flat_set<AccountID> list;
126 for (
auto const& it :
mNodes)
128 int index = it.getFieldIndex(
134 dynamic_cast<const STObject*
>(&it.peekAtIndex(index));
138 for (
auto const& field : *inner)
140 if (
auto sa =
dynamic_cast<STAccount const*
>(&field))
142 assert(!sa->isDefault());
143 if (!sa->isDefault())
144 list.insert(sa->value());
153 dynamic_cast<const STAmount*
>(&field);
159 if (issuer.isNonZero())
164 JLOG(j.
fatal()) <<
"limit is not amount "
204 Throw<std::runtime_error>(
"Affected node not found");
211 for (
auto const& n :
mNodes)
217 Throw<std::runtime_error>(
"Affected node not found");
233 assert((mTransactionID == s.mTransactionID) && (mLedger == s.mLedger));
234 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