From 6fb0f135e7f10d84bae892030c58a26fad0f2bd4 Mon Sep 17 00:00:00 2001 From: Volodymyr Kravets Date: Tue, 26 Sep 2023 18:31:44 +0300 Subject: [PATCH] Fixed unit tests after rebase --- .../eth/EthModuleGasEstimationDSLTest.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rskj-core/src/test/java/co/rsk/rpc/modules/eth/EthModuleGasEstimationDSLTest.java b/rskj-core/src/test/java/co/rsk/rpc/modules/eth/EthModuleGasEstimationDSLTest.java index 92a26de2e65..d5cc63fc134 100644 --- a/rskj-core/src/test/java/co/rsk/rpc/modules/eth/EthModuleGasEstimationDSLTest.java +++ b/rskj-core/src/test/java/co/rsk/rpc/modules/eth/EthModuleGasEstimationDSLTest.java @@ -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()); @@ -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); @@ -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()); @@ -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); @@ -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); @@ -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()); @@ -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()); @@ -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()); @@ -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()); @@ -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); @@ -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);