Skip to content

Commit

Permalink
revise unit test to reflect new behavior of rpcGasCap
Browse files Browse the repository at this point in the history
Signed-off-by: garyschulte <garyschulte@gmail.com>
  • Loading branch information
garyschulte committed Apr 29, 2024
1 parent e7e33b1 commit c3e9cf3
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -565,8 +565,9 @@ public void shouldCapGasLimitWhenOriginalTransactionExceedsGasCap() {
}

@Test
public void shouldKeepOriginalGasLimitWhenCapIsHigherThanOriginalValue() {
// generate a transaction with a gas limit that is lower than the gas cap
public void shouldUseRpcGasCapWhenCapIsHigherThanGasLimit() {
// generate a transaction with a gas limit that is lower than the gas cap,
// expect the gas cap to override parameter gas limit
final CallParameter callParameter =
eip1559TransactionCallParameter(Wei.ZERO, Wei.ZERO, GASCAP - 1);

Expand All @@ -589,6 +590,7 @@ public void shouldKeepOriginalGasLimitWhenCapIsHigherThanOriginalValue() {
.value(callParameter.getValue())
.payload(callParameter.getPayload())
.signature(FAKE_SIGNATURE)
.gasLimit(GASCAP)
.build();

// call process with original transaction
Expand Down

0 comments on commit c3e9cf3

Please sign in to comment.