#include <Batch.h>
◆ ConsequencesFactoryType
| Enumerator |
|---|
| Normal | |
| Blocker | |
| Custom | |
Definition at line 155 of file Transactor.h.
◆ Batch()
◆ calculateBaseFee()
Calculates the total base fee for a batch transaction.
This function computes the required base fee for a batch transaction, including the base fee for the batch itself, the sum of base fees for all inner transactions, and additional fees for each batch signer. It performs overflow checks and validates the structure of the batch and its signers.
- Parameters
-
| view | The ledger view providing fee and state information. |
| tx | The batch transaction to calculate the fee for. |
- Returns
- XRPAmount The total base fee required for the batch transaction.
- Exceptions
-
Definition at line 54 of file Batch.cpp.
◆ preflight()
Performs preflight validation checks for a Batch transaction.
This function validates the structure and contents of a Batch transaction before it is processed. It ensures that the Batch feature is enabled, checks for valid flags, validates the number and uniqueness of inner transactions, and enforces correct signing and fee requirements.
The following validations are performed:
- The Batch feature must be enabled in the current rules.
- Only one of the mutually exclusive batch flags must be set.
- The batch must contain at least two and no more than the maximum allowed inner transactions.
- Each inner transaction must:
- Be unique within the batch.
- Not itself be a Batch transaction.
- Have the tfInnerBatchTxn flag set.
- Not include a TxnSignature or Signers field.
- Have an empty SigningPubKey.
- Pass its own preflight checks.
- Have a fee of zero.
- Have either Sequence or TicketSequence set, but not both or neither.
- Not duplicate Sequence or TicketSequence values for the same account (for certain flags).
- Validates that all required inner transaction accounts are present in the batch signers array, and that all batch signers are unique and not the outer account.
- Verifies the batch signature if batch signers are present.
- Parameters
-
- Returns
- NotTEC Returns tesSUCCESS if all checks pass, or an appropriate error code otherwise.
Definition at line 201 of file Batch.cpp.
◆ checkSign()
Checks the validity of signatures for a batch transaction.
This method first verifies the standard transaction signature by calling Transactor::checkSign. If the signature is not valid it returns the corresponding error code.
Next, it verifies the batch-specific signature requirements by calling Transactor::checkBatchSign. If this check fails, it also returns the corresponding error code.
If both checks succeed, the function returns tesSUCCESS.
- Parameters
-
- Returns
- NotTEC Returns tesSUCCESS if all signature checks pass, or an error code otherwise.
Definition at line 475 of file Batch.cpp.
◆ doApply()
| TER ripple::Batch::doApply |
( |
| ) |
|
|
overridevirtual |
Applies the outer batch transaction.
This method is responsible for applying the outer batch transaction. The inner transactions within the batch are applied separately in the applyBatchTransactions method after the outer transaction is processed.
- Returns
- TER Returns tesSUCCESS to indicate successful application of the outer batch transaction.
Implements ripple::Transactor.
Definition at line 497 of file Batch.cpp.
◆ operator()()
◆ view() [1/2]
◆ view() [2/2]
| ApplyView const & ripple::Transactor::view |
( |
| ) |
const |
|
inherited |
◆ checkSeqProxy()
◆ checkPriorTxAndLastLedger()
◆ checkFee()
◆ checkBatchSign()
◆ preclaim()
◆ checkPermission()
| TER ripple::Transactor::checkPermission |
( |
ReadView const & |
view, |
|
|
STTx const & |
tx |
|
) |
| |
|
staticinherited |
◆ ticketDelete()
◆ apply()
| TER ripple::Transactor::apply |
( |
| ) |
|
|
protectedinherited |
◆ preCompute()
| void ripple::Transactor::preCompute |
( |
| ) |
|
|
protectedvirtualinherited |
◆ minimumFee()
Compute the minimum fee required to process a transaction with a given baseFee based on the current server load.
- Parameters
-
| app | The application hosting the server |
| baseFee | The base fee of a candidate transaction |
- See also
- ripple::calculateBaseFee
- Parameters
-
| fees | Fee settings from the current ledger |
| flags | Transaction processing fees |
Definition at line 251 of file Transactor.cpp.
◆ reset()
Reset the context, discarding any changes made and adjust the fee.
- Parameters
-
| fee | The transaction fee to be charged. |
- Returns
- A pair containing the transaction result and the actual fee charged.
Definition at line 1002 of file Transactor.cpp.
◆ consumeSeqProxy()
◆ payFee()
| TER ripple::Transactor::payFee |
( |
| ) |
|
|
privateinherited |
◆ checkSingleSign()
◆ checkMultiSign()
◆ trapTransaction()
| void ripple::Transactor::trapTransaction |
( |
uint256 |
txHash | ) |
const |
|
privateinherited |
◆ ConsequencesFactory
◆ ctx_
◆ sink_
◆ j_
◆ account_
◆ mPriorBalance
◆ mSourceBalance