mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-30 18:40:28 +00:00
remove getTicketIndex
This commit is contained in:
@@ -403,12 +403,6 @@ getQualityNext(uint256 const& uBase);
|
||||
std::uint64_t
|
||||
getQuality(uint256 const& uBase);
|
||||
|
||||
uint256
|
||||
getTicketIndex(AccountID const& account, std::uint32_t uSequence);
|
||||
|
||||
uint256
|
||||
getTicketIndex(AccountID const& account, SeqProxy ticketSeq);
|
||||
|
||||
template <class... KeyletParams>
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
|
||||
struct KeyletDesc
|
||||
|
||||
@@ -180,19 +180,6 @@ getQuality(uint256 const& uBase)
|
||||
return boost::endian::load_big_u64(uBase.end() - 8);
|
||||
}
|
||||
|
||||
uint256
|
||||
getTicketIndex(AccountID const& account, std::uint32_t ticketSeq)
|
||||
{
|
||||
return indexHash(LedgerNameSpace::Ticket, account, ticketSeq);
|
||||
}
|
||||
|
||||
uint256
|
||||
getTicketIndex(AccountID const& account, SeqProxy ticketSeq)
|
||||
{
|
||||
XRPL_ASSERT(ticketSeq.isTicket(), "xrpl::getTicketIndex : valid input");
|
||||
return getTicketIndex(account, ticketSeq.value());
|
||||
}
|
||||
|
||||
MPTID
|
||||
makeMptID(std::uint32_t sequence, AccountID const& account)
|
||||
{
|
||||
@@ -320,9 +307,9 @@ next(Keylet const& k)
|
||||
}
|
||||
|
||||
Keylet
|
||||
ticket(AccountID const& id, SeqProxy ticketSeq)
|
||||
ticket(AccountID const& id, SeqProxy seq)
|
||||
{
|
||||
return {ltTICKET, getTicketIndex(id, ticketSeq)};
|
||||
return {ltTICKET, indexHash(LedgerNameSpace::Ticket, id, seq.value())};
|
||||
}
|
||||
|
||||
// This function is presently static, since it's never accessed from anywhere
|
||||
|
||||
@@ -791,16 +791,17 @@ TER
|
||||
Transactor::consumeSeqProxy(SLE::pointer const& sleAccount)
|
||||
{
|
||||
XRPL_ASSERT(sleAccount, "xrpl::Transactor::consumeSeqProxy : non-null account");
|
||||
SeqProxy const seqProx = ctx_.tx.getSeqProxy();
|
||||
if (seqProx.isSeq())
|
||||
SeqProxy const seqProxy = ctx_.tx.getSeqProxy();
|
||||
if (seqProxy.isSeq())
|
||||
{
|
||||
// Note that if this transaction is a TicketCreate, then
|
||||
// the transaction will modify the account root sfSequence
|
||||
// yet again.
|
||||
sleAccount->setFieldU32(sfSequence, seqProx.value() + 1);
|
||||
sleAccount->setFieldU32(sfSequence, seqProxy.value() + 1);
|
||||
return tesSUCCESS;
|
||||
}
|
||||
return ticketDelete(view(), accountID_, getTicketIndex(accountID_, seqProx), j_);
|
||||
auto const keylet = keylet::ticket(accountID_, seqProxy);
|
||||
return ticketDelete(view(), accountID_, keylet.key, j_);
|
||||
}
|
||||
|
||||
// Remove a single Ticket from the ledger.
|
||||
|
||||
@@ -762,7 +762,7 @@ parseTicket(
|
||||
if (!seq)
|
||||
return std::unexpected(seq.error());
|
||||
|
||||
return getTicketIndex(*id, *seq);
|
||||
return keylet::ticket(*id, SeqProxy::sequence(*seq)).key;
|
||||
}
|
||||
|
||||
static std::expected<uint256, json::Value>
|
||||
|
||||
Reference in New Issue
Block a user