Search in sources :

Example 1 with TransactionPoolOptions

use of org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions in project besu by hyperledger.

the class TransactionPoolOptionsTest method eth65TrxAnnouncedBufferingPeriod.

@Test
public void eth65TrxAnnouncedBufferingPeriod() {
    final long eth65TrxAnnouncedBufferingPeriod = 999;
    final TestBesuCommand cmd = parseCommand("--Xeth65-tx-announced-buffering-period-milliseconds", String.valueOf(eth65TrxAnnouncedBufferingPeriod));
    final TransactionPoolOptions options = getOptionsFromBesuCommand(cmd);
    final TransactionPoolConfiguration config = options.toDomainObject().build();
    assertThat(config.getEth65TrxAnnouncedBufferingPeriod()).hasMillis(eth65TrxAnnouncedBufferingPeriod);
    assertThat(commandOutput.toString(UTF_8)).isEmpty();
    assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
Also used : ImmutableTransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration) TransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration) TransactionPoolOptions(org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions) Test(org.junit.Test)

Example 2 with TransactionPoolOptions

use of org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions in project besu by hyperledger.

the class TransactionPoolOptionsTest method strictTxReplayProtection_disabled.

@Test
public void strictTxReplayProtection_disabled() {
    final TestBesuCommand cmd = parseCommand("--strict-tx-replay-protection-enabled=false");
    final TransactionPoolOptions options = getOptionsFromBesuCommand(cmd);
    final TransactionPoolConfiguration config = options.toDomainObject().build();
    assertThat(config.getStrictTransactionReplayProtectionEnabled()).isFalse();
    assertThat(commandOutput.toString(UTF_8)).isEmpty();
    assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
Also used : ImmutableTransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration) TransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration) TransactionPoolOptions(org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions) Test(org.junit.Test)

Example 3 with TransactionPoolOptions

use of org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions in project besu by hyperledger.

the class TransactionPoolOptionsTest method strictTxReplayProtection_enabled.

@Test
public void strictTxReplayProtection_enabled() {
    final TestBesuCommand cmd = parseCommand("--strict-tx-replay-protection-enabled");
    final TransactionPoolOptions options = getOptionsFromBesuCommand(cmd);
    final TransactionPoolConfiguration config = options.toDomainObject().build();
    assertThat(config.getStrictTransactionReplayProtectionEnabled()).isTrue();
    assertThat(commandOutput.toString(UTF_8)).isEmpty();
    assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
Also used : ImmutableTransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration) TransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration) TransactionPoolOptions(org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions) Test(org.junit.Test)

Example 4 with TransactionPoolOptions

use of org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions in project besu by hyperledger.

the class TransactionPoolOptionsTest method strictTxReplayProtection_enabledWithBooleanArg.

@Test
public void strictTxReplayProtection_enabledWithBooleanArg() {
    final TestBesuCommand cmd = parseCommand("--strict-tx-replay-protection-enabled=true");
    final TransactionPoolOptions options = getOptionsFromBesuCommand(cmd);
    final TransactionPoolConfiguration config = options.toDomainObject().build();
    assertThat(config.getStrictTransactionReplayProtectionEnabled()).isTrue();
    assertThat(commandOutput.toString(UTF_8)).isEmpty();
    assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
Also used : ImmutableTransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration) TransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration) TransactionPoolOptions(org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions) Test(org.junit.Test)

Example 5 with TransactionPoolOptions

use of org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions in project besu by hyperledger.

the class TransactionPoolOptionsTest method txMessageKeepAliveSeconds.

@Test
public void txMessageKeepAliveSeconds() {
    final int txMessageKeepAliveSeconds = 999;
    final TestBesuCommand cmd = parseCommand("--Xincoming-tx-messages-keep-alive-seconds", String.valueOf(txMessageKeepAliveSeconds));
    final TransactionPoolOptions options = getOptionsFromBesuCommand(cmd);
    final TransactionPoolConfiguration config = options.toDomainObject().build();
    assertThat(config.getTxMessageKeepAliveSeconds()).isEqualTo(txMessageKeepAliveSeconds);
    assertThat(commandOutput.toString(UTF_8)).isEmpty();
    assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
}
Also used : ImmutableTransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration) TransactionPoolConfiguration(org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration) TransactionPoolOptions(org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions) Test(org.junit.Test)

Aggregations

TransactionPoolOptions (org.hyperledger.besu.cli.options.unstable.TransactionPoolOptions)6 ImmutableTransactionPoolConfiguration (org.hyperledger.besu.ethereum.eth.transactions.ImmutableTransactionPoolConfiguration)6 TransactionPoolConfiguration (org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration)6 Test (org.junit.Test)6