Skip to content

Commit

Permalink
Fixed unit tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
Vovchyk committed Sep 26, 2023
1 parent 897d14d commit 6fb0f13
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void testEstimateGas_contractCallsWithValueTransfer() throws FileNotFoundExcepti

// Estimate the gas to use
long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(35728, estimatedGas);
assertEquals(35520, estimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -195,7 +195,7 @@ void testEstimateGas_storageRefunds() throws FileNotFoundException, DslProcessor

long clearStorageGasUsed = callConstantResult.getGasUsed();
long clearStorageEstimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(26909, clearStorageEstimatedGas);
assertEquals(26649, clearStorageEstimatedGas);

assertTrue(eth.getEstimationResult().getDeductedRefund() > 0);

Expand All @@ -220,7 +220,7 @@ void testEstimateGas_storageRefunds() throws FileNotFoundException, DslProcessor
"0000000000000000000000000000000000000000000000000000000000000001"); // setValue(1,1)
long updateStorageGasUsed = eth.callConstant(args, block).getGasUsed();
long updateStorageEstimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(26973, updateStorageEstimatedGas);
assertEquals(26661, updateStorageEstimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -255,7 +255,7 @@ void testEstimateGas_storageRefunds() throws FileNotFoundException, DslProcessor
ProgramResult anotherCallConstantResult = eth.callConstant(args, block);
long anotherClearStorageGasUsed = anotherCallConstantResult.getGasUsed();
long anotherClearStorageEstimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(26909, anotherClearStorageEstimatedGas);
assertEquals(26649, anotherClearStorageEstimatedGas);

assertTrue(eth.getEstimationResult().getDeductedRefund() > 0);

Expand Down Expand Up @@ -325,7 +325,7 @@ void estimateGas_callWithValuePlusSStoreRefund() throws FileNotFoundException, D
long callConstantGasUsed = callConstant.getGasUsed();

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(40771, estimatedGas);
assertEquals(40563, estimatedGas);

assertTrue(estimatedGas > callConstantGasUsed);
assertEquals(callConstant.getMaxGasUsed() + GasCost.STIPEND_CALL, estimatedGas);
Expand Down Expand Up @@ -401,7 +401,7 @@ void estimateGas_nestedCallsWithValueAndGasRetain() throws FileNotFoundException
long callConstantGasUsed = callConstant.getGasUsed();

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(48841, estimatedGas);
assertEquals(48633, estimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -477,7 +477,7 @@ void estimateGas_subsequentCallWithValueAndGasStipendCase1() throws FileNotFound
assertTrue(callConstant.isCallWithValuePerformed());

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(39459, estimatedGas);
assertEquals(39251, estimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -550,7 +550,7 @@ void estimateGas_subsequentCallWithValueAndGasStipendCase2() throws FileNotFound
assertTrue(callConstant.isCallWithValuePerformed());

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(48674, estimatedGas);
assertEquals(48466, estimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -603,7 +603,7 @@ void estimateGas_firstCallMoveAllRemainingSecondNot() throws FileNotFoundExcepti

// Estimate the gas to use
long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(34996, estimatedGas);
assertEquals(34788, estimatedGas);

assertEquals(0, eth.getEstimationResult().getDeductedRefund());

Expand Down Expand Up @@ -684,7 +684,7 @@ void estimateGas_nestedCallsWithValueGasRetainAndStorageRefund() throws FileNotF
long callConstantGasUsed = callConstant.getGasUsed();

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(84210, estimatedGas);
assertEquals(84002, estimatedGas);

assertTrue(eth.getEstimationResult().getDeductedRefund() > 0);

Expand Down Expand Up @@ -760,7 +760,7 @@ void estimateGas_nestedCallsWithValueFixedGasRetainAndStorageRefund() throws Fil
long callConstantGasUsed = callConstant.getGasUsed();

long estimatedGas = estimateGas(eth, args, BlockTag.LATEST.getTag());
assertEquals(84200, estimatedGas);
assertEquals(83992, estimatedGas);

assertTrue(eth.getEstimationResult().getDeductedRefund() > 0);

Expand Down

0 comments on commit 6fb0f13

Please sign in to comment.