mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-08 21:38:15 -05:00
remove code duplication (#6028)
Signed-off-by: Stefan <stefan.pingel@consensys.net>
This commit is contained in:
@@ -170,17 +170,6 @@ public class MainnetTransactionValidator implements TransactionValidator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transaction.getType().supportsBlob()) {
|
|
||||||
final long txTotalBlobGas = gasCalculator.blobGasCost(transaction.getBlobCount());
|
|
||||||
if (txTotalBlobGas > gasLimitCalculator.currentBlobGasLimit()) {
|
|
||||||
return ValidationResult.invalid(
|
|
||||||
TransactionInvalidReason.TOTAL_BLOB_GAS_TOO_HIGH,
|
|
||||||
String.format(
|
|
||||||
"total blob gas %d exceeds max blob gas per block %d",
|
|
||||||
txTotalBlobGas, gasLimitCalculator.currentBlobGasLimit()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
final long intrinsicGasCost =
|
final long intrinsicGasCost =
|
||||||
gasCalculator.transactionIntrinsicGasCost(
|
gasCalculator.transactionIntrinsicGasCost(
|
||||||
transaction.getPayload(), transaction.isContractCreation())
|
transaction.getPayload(), transaction.isContractCreation())
|
||||||
|
|||||||
Reference in New Issue
Block a user