Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Xlayered-tx-pool to the config log printout #5665

Merged
merged 4 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3675,6 +3675,10 @@ private String generateConfigurationOverview() {
builder.setHighSpecEnabled();
}

if (buildTransactionPoolConfiguration().getLayeredTxPoolEnabled()) {
builder.setLayeredTxPoolEnabled();
}

return builder.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public class ConfigurationOverviewBuilder {
private Collection<String> engineApis;
private String engineJwtFilePath;
private boolean isHighSpec = false;
private boolean isLayeredTxPool = false;
private Map<String, String> environment;

/**
Expand Down Expand Up @@ -165,6 +166,16 @@ public ConfigurationOverviewBuilder setHighSpecEnabled() {
return this;
}

/**
* Sets experimental layered txpool enabled.
*
* @return the builder
*/
public ConfigurationOverviewBuilder setLayeredTxPoolEnabled() {
isLayeredTxPool = true;
return this;
}

/**
* Sets the engine jwt file path.
*
Expand Down Expand Up @@ -237,7 +248,11 @@ public String build() {
}

if (isHighSpec) {
lines.add("High spec configuration enabled");
lines.add("Experimental high spec configuration enabled");
}

if (isLayeredTxPool) {
lines.add("Experimental layered transaction pool configuration enabled");
}

lines.add("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,22 @@ void setEngineApis() {
@Test
void setHighSpecEnabled() {
final String highSpecNotEnabled = builder.build();
assertThat(highSpecNotEnabled).doesNotContain("High spec configuration enabled");
assertThat(highSpecNotEnabled).doesNotContain("Experimental high spec configuration enabled");

builder.setHighSpecEnabled();
final String highSpecEnabled = builder.build();
assertThat(highSpecEnabled).contains("High spec configuration enabled");
assertThat(highSpecEnabled).contains("Experimental high spec configuration enabled");
}

@Test
void setLayeredTxPoolEnabled() {
final String layeredTxPoolDisabled = builder.build();
assertThat(layeredTxPoolDisabled)
.doesNotContain("Experimental layered transaction pool configuration enabled");

builder.setLayeredTxPoolEnabled();
final String layeredTxPoolEnabled = builder.build();
assertThat(layeredTxPoolEnabled)
.contains("Experimental layered transaction pool configuration enabled");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public interface BftConfigOptions {

/**
* Gets epoch length.
* The number of blocks in an epoch.
*
* @return the epoch length
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class CliqueConfigOptions {
}

/**
* Gets epoch length.
* The number of blocks in an epoch.
*
* @return the epoch length
*/
Expand Down