From 9cfb9b43a915625c620b53676240ee45152ae187 Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Thu, 20 Nov 2025 16:25:37 +0800 Subject: [PATCH] eth: remove unused variables in func `computeTxEnv`, fix XFN-92 --- eth/api_tracer.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 566884a50d..6bf25409f2 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -812,8 +812,6 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree statedb.DeleteAddress(common.BlockSignersBinary) } core.InitSignerInTransactions(api.config, block.Header(), block.Transactions()) - balanceUpdated := map[common.Address]*big.Int{} - totalFeeUsed := big.NewInt(0) gp := new(core.GasPool).AddGas(block.GasLimit()) usedGas := new(uint64) // Iterate over and process the individual transactions @@ -842,8 +840,6 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree if tokenFeeUsed { fee := common.GetGasFee(block.Header().Number.Uint64(), gas) feeCapacity[*tx.To()] = new(big.Int).Sub(feeCapacity[*tx.To()], fee) - balanceUpdated[*tx.To()] = feeCapacity[*tx.To()] - totalFeeUsed = totalFeeUsed.Add(totalFeeUsed, fee) } } statedb.DeleteSuicides()