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