mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 15:20:54 +00:00
refactor: rename STTx::getFeePayer to getInitiator (#7603)
This commit is contained in:
@@ -84,7 +84,7 @@ public:
|
||||
getSeqValue() const;
|
||||
|
||||
AccountID
|
||||
getFeePayer() const;
|
||||
getInitiator() const;
|
||||
|
||||
boost::container::flat_set<AccountID>
|
||||
getMentionedAccounts() const;
|
||||
|
||||
@@ -213,7 +213,7 @@ STTx::getSeqValue() const
|
||||
}
|
||||
|
||||
AccountID
|
||||
STTx::getFeePayer() const
|
||||
STTx::getInitiator() const
|
||||
{
|
||||
// If sfDelegate is present, the delegate account is the payer
|
||||
// note: if a delegate is specified, its authorization to act on behalf of the account is
|
||||
@@ -546,7 +546,7 @@ STTx::checkMultiSign(Rules const& rules, STObject const& sigObject) const
|
||||
// For delegated transactions sfDelegate is the account whose signer list is checked,
|
||||
// the delegate account itself can not be among the signers.
|
||||
auto const txnAccountID =
|
||||
&sigObject != this ? std::nullopt : std::optional<AccountID>(getFeePayer());
|
||||
&sigObject != this ? std::nullopt : std::optional<AccountID>(getInitiator());
|
||||
|
||||
// We can ease the computational load inside the loop a bit by
|
||||
// pre-constructing part of the data that we hash. Fill a Serializer
|
||||
|
||||
@@ -1349,7 +1349,7 @@ Transactor::getFeePayer(ReadView const& view, STTx const& tx)
|
||||
.type = FeePayerType::SponsorPreFunded};
|
||||
}
|
||||
|
||||
auto const payerAccountKeylet = keylet::account(tx.getFeePayer());
|
||||
auto const payerAccountKeylet = keylet::account(tx.getInitiator());
|
||||
auto const payerType =
|
||||
tx.isFieldPresent(sfDelegate) ? FeePayerType::Delegate : FeePayerType::Account;
|
||||
|
||||
|
||||
@@ -640,7 +640,7 @@ Payment::doApply()
|
||||
|
||||
// In a delegated payment, the fee payer is the delegated account,
|
||||
// not the source account (accountID_).
|
||||
bool const accountIsPayer = (ctx_.tx.getFeePayer() == accountID_);
|
||||
bool const accountIsPayer = (ctx_.tx.getInitiator() == accountID_);
|
||||
|
||||
// preFeeBalance_ is the balance on the source account (accountID_) BEFORE the fees
|
||||
// were charged. If source account is the fee payer, it must also cover the fee.
|
||||
|
||||
@@ -1256,7 +1256,7 @@ transactionSignFor(
|
||||
// The array must be sorted and validated.
|
||||
// For delegated transactions, the delegate account is
|
||||
// the one forbidden from appearing in its own Signers array.
|
||||
auto err = sortAndValidateSigners(signers, sttx->getFeePayer());
|
||||
auto err = sortAndValidateSigners(signers, sttx->getInitiator());
|
||||
if (RPC::containsError(err))
|
||||
return err;
|
||||
}
|
||||
@@ -1423,9 +1423,9 @@ transactionSubmitMultiSigned(
|
||||
}
|
||||
|
||||
// The array must be sorted and validated.
|
||||
// For delegated transactions, getFeePayer() returns sfDelegate,
|
||||
// For delegated transactions, getInitiator() returns sfDelegate,
|
||||
// that account is the one forbidden from appearing in its own Signers array.
|
||||
auto err = sortAndValidateSigners(signers, stTx->getFeePayer());
|
||||
auto err = sortAndValidateSigners(signers, stTx->getInitiator());
|
||||
if (RPC::containsError(err))
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user