|
|
|
@ -18,6 +18,7 @@ import static java.util.Arrays.asList; |
|
|
|
|
import static java.util.Collections.emptyList; |
|
|
|
|
import static java.util.stream.Collectors.toList; |
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat; |
|
|
|
|
import static org.assertj.core.api.Assertions.assertThatCode; |
|
|
|
|
import static org.mockito.Mockito.when; |
|
|
|
|
|
|
|
|
|
import org.hyperledger.besu.config.StubGenesisConfigOptions; |
|
|
|
@ -54,6 +55,7 @@ import org.junit.jupiter.api.Test; |
|
|
|
|
import org.junit.jupiter.params.ParameterizedTest; |
|
|
|
|
import org.junit.jupiter.params.provider.ValueSource; |
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
|
public class TransactionPoolLondonTest extends AbstractTransactionPoolTest { |
|
|
|
|
|
|
|
|
|
private static final Wei BASE_FEE_FLOOR = Wei.of(7L); |
|
|
|
@ -253,6 +255,25 @@ public class TransactionPoolLondonTest extends AbstractTransactionPoolTest { |
|
|
|
|
.isEqualTo(1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
public void addRemoteTransactionsShouldAllowDuplicates() { |
|
|
|
|
final Transaction transaction1 = createTransaction(1, Wei.of(7L)); |
|
|
|
|
final Transaction transaction2 = createTransaction(2, Wei.of(7L)); |
|
|
|
|
final Transaction transaction3 = createTransaction(2, Wei.of(7L)); |
|
|
|
|
final Transaction transaction4 = createTransaction(3, Wei.of(7L)); |
|
|
|
|
|
|
|
|
|
givenTransactionIsValid(transaction1); |
|
|
|
|
givenTransactionIsValid(transaction2); |
|
|
|
|
givenTransactionIsValid(transaction3); |
|
|
|
|
givenTransactionIsValid(transaction4); |
|
|
|
|
|
|
|
|
|
assertThatCode( |
|
|
|
|
() -> |
|
|
|
|
transactionPool.addRemoteTransactions( |
|
|
|
|
List.of(transaction1, transaction2, transaction3, transaction4))) |
|
|
|
|
.doesNotThrowAnyException(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private int add1559TxAndGetPendingTxsCount( |
|
|
|
|
final Wei genesisBaseFee, |
|
|
|
|
final Wei minGasPrice, |
|
|
|
|