|
|
@ -160,15 +160,17 @@ public class TransactionPool implements BlockAddedObserver { |
|
|
|
|
|
|
|
|
|
|
|
public ValidationResult<TransactionInvalidReason> addLocalTransaction( |
|
|
|
public ValidationResult<TransactionInvalidReason> addLocalTransaction( |
|
|
|
final Transaction transaction) { |
|
|
|
final Transaction transaction) { |
|
|
|
|
|
|
|
if (transaction.isFrontierTransaction() |
|
|
|
|
|
|
|
&& (!ExperimentalEIPs.eip1559Enabled || this.eip1559.isEmpty())) { |
|
|
|
final Wei transactionGasPrice = minTransactionGasPrice(transaction); |
|
|
|
final Wei transactionGasPrice = minTransactionGasPrice(transaction); |
|
|
|
if (transactionGasPrice.compareTo(minTransactionGasPrice) < 0) { |
|
|
|
if (transactionGasPrice.compareTo(minTransactionGasPrice) < 0) { |
|
|
|
return ValidationResult.invalid(TransactionInvalidReason.GAS_PRICE_TOO_LOW); |
|
|
|
return ValidationResult.invalid(TransactionInvalidReason.GAS_PRICE_TOO_LOW); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!configuration.getTxFeeCap().isZero() |
|
|
|
if (!configuration.getTxFeeCap().isZero() |
|
|
|
&& transactionGasPrice.compareTo(configuration.getTxFeeCap()) > 0) { |
|
|
|
&& transactionGasPrice.compareTo(configuration.getTxFeeCap()) > 0) { |
|
|
|
return ValidationResult.invalid(TransactionInvalidReason.TX_FEECAP_EXCEEDED); |
|
|
|
return ValidationResult.invalid(TransactionInvalidReason.TX_FEECAP_EXCEEDED); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final ValidationResult<TransactionInvalidReason> validationResult = |
|
|
|
final ValidationResult<TransactionInvalidReason> validationResult = |
|
|
|
validateTransaction(transaction); |
|
|
|
validateTransaction(transaction); |
|
|
|