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