Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 committed Nov 5, 2024
1 parent 2968444 commit db537b5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

package linea.plugin.acc.test;

import static net.consensys.linea.metrics.LineaMetricCategory.PRICING_CONF;
import static net.consensys.linea.metrics.LineaMetricCategory.SEQUENCER_PROFITABILITY;
import static org.assertj.core.api.Assertions.*;

import java.io.IOException;
Expand All @@ -39,7 +41,6 @@
import com.fasterxml.jackson.databind.node.ObjectNode;
import linea.plugin.acc.test.tests.web3j.generated.SimpleStorage;
import lombok.extern.slf4j.Slf4j;
import net.consensys.linea.metrics.LineaMetricCategory;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.tuweni.bytes.Bytes;
import org.apache.tuweni.bytes.Bytes32;
Expand Down Expand Up @@ -135,7 +136,7 @@ private BesuNode createCliqueNodeWithExtraCliOptionsAndRpcApis(
.metricsConfiguration(
MetricsConfiguration.builder()
.enabled(true)
.metricCategories(Set.of(LineaMetricCategory.SEQUENCER_PROFITABILITY))
.metricCategories(Set.of(PRICING_CONF, SEQUENCER_PROFITABILITY))
.build())
.requestedPlugins(
List.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,17 @@ public void updateProfitabilityParamsViaExtraData() throws IOException, Interrup
assertThat(getTxPoolContent()).isEmpty();

final var fixedCostMetric =
getMetricValue(PRICING_CONF, "conf", List.of(entry("field", "fixed_cost_wei")));
getMetricValue(PRICING_CONF, "values", List.of(entry("field", "fixed_cost_wei")));

assertThat(fixedCostMetric).isEqualTo(MIN_GAS_PRICE.multiply(2).getValue().doubleValue());

final var variableCostMetric =
getMetricValue(PRICING_CONF, "conf", List.of(entry("field", "variable_cost_wei")));
getMetricValue(PRICING_CONF, "values", List.of(entry("field", "variable_cost_wei")));

assertThat(variableCostMetric).isEqualTo(MIN_GAS_PRICE.getValue().doubleValue());

final var ethGasPriceMetric =
getMetricValue(PRICING_CONF, "conf", List.of(entry("field", "eth_gas_price_wei")));
getMetricValue(PRICING_CONF, "values", List.of(entry("field", "eth_gas_price_wei")));

assertThat(ethGasPriceMetric).isEqualTo(MIN_GAS_PRICE.getValue().doubleValue());
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
releaseVersion=0.8.0-rc5.1
besuVersion=24.11-develop-eb7bb53
besuVersion=24.11-local
arithmetizationVersion=0.8.0-rc5
besuArtifactGroup=io.consensys.linea-besu
distributionIdentifier=linea-sequencer
Expand Down

0 comments on commit db537b5

Please sign in to comment.