mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-31 11:00:23 +00:00
respond to comments
This commit is contained in:
@@ -53,7 +53,10 @@ public:
|
||||
operator=(SeqProxy const& other) = default;
|
||||
|
||||
/**
|
||||
* Factory function to return a sequence-based SeqProxy
|
||||
* Factory function to return a sequence-based SeqProxy.
|
||||
* Outside of tests, this function should only be used for "secondary" transaction sequences,
|
||||
* e.g. `sfOfferSequence`, or sequence fields in an existing ledger object. DO NOT use this for
|
||||
* the "primary" sequence of a transaction, `sfSequence`.
|
||||
*/
|
||||
static constexpr SeqProxy
|
||||
sequence(std::uint32_t v)
|
||||
@@ -62,7 +65,10 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory function to return a ticket-based SeqProxy
|
||||
* Factory function to return a ticket-based SeqProxy.
|
||||
* Outside of tests, this function should only be used for "secondary" transaction sequences,
|
||||
* e.g. `sfOfferSequence`, or sequence fields in an existing ledger object. DO NOT use this for
|
||||
* the "primary" ticket sequence of a transaction, `sfTicketSequence`.
|
||||
*/
|
||||
static constexpr SeqProxy
|
||||
ticket(std::uint32_t v)
|
||||
|
||||
@@ -202,7 +202,7 @@ STTx::getSeqProxy() const
|
||||
if (seq != 0)
|
||||
return SeqProxy::sequence(seq);
|
||||
|
||||
std::optional<std::uint32_t> const ticketSeq{operator[](~sfTicketSequence)};
|
||||
std::optional<std::uint32_t> const ticketSeq{at(~sfTicketSequence)};
|
||||
if (!ticketSeq)
|
||||
{
|
||||
// No TicketSequence specified. Return the Sequence, whatever it is.
|
||||
|
||||
@@ -201,14 +201,14 @@ CheckCreate::doApply()
|
||||
return ret;
|
||||
// Note that we use the value from the sequence or ticket as the
|
||||
// Check sequence. For more explanation see comments in SeqProxy.h.
|
||||
std::uint32_t const seq = ctx_.tx.getSeqValue();
|
||||
Keylet const checkKeylet = keylet::check(accountID_, ctx_.tx.getSeqProxy());
|
||||
auto const seq = ctx_.tx.getSeqProxy();
|
||||
Keylet const checkKeylet = keylet::check(accountID_, seq);
|
||||
auto sleCheck = std::make_shared<SLE>(checkKeylet);
|
||||
|
||||
sleCheck->setAccountID(sfAccount, accountID_);
|
||||
AccountID const dstAccountId = ctx_.tx[sfDestination];
|
||||
sleCheck->setAccountID(sfDestination, dstAccountId);
|
||||
sleCheck->setFieldU32(sfSequence, seq);
|
||||
sleCheck->setFieldU32(sfSequence, seq.value());
|
||||
sleCheck->setFieldAmount(sfSendMax, ctx_.tx[sfSendMax]);
|
||||
if (auto const srcTag = ctx_.tx[~sfSourceTag])
|
||||
sleCheck->setFieldU32(sfSourceTag, *srcTag);
|
||||
|
||||
Reference in New Issue
Block a user