From 0484068df5758bae60818567ce1908f4fba800ea Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Mon, 11 Dec 2023 14:17:29 +0330 Subject: [PATCH] fix lint issues --- core/state/metadata.go | 30 +++++++++++++++--------------- eth/tracers/live/printer.go | 1 - eth/tracers/native/prestate.go | 1 - 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/core/state/metadata.go b/core/state/metadata.go index 90ea3d1742..6a2f20a0f9 100644 --- a/core/state/metadata.go +++ b/core/state/metadata.go @@ -22,30 +22,30 @@ type BalanceChangeReason byte const ( BalanceChangeUnspecified BalanceChangeReason = 0 - BalanceChangeRewardMineUncle = 1 - BalanceChangeRewardMineBlock = 2 - BalanceChangeDaoRefundContract = 3 - BalanceChangeDaoAdjustBalance = 4 - BalanceChangeTransfer = 5 - BalanceChangeGenesisBalance = 6 - BalanceChangeGasBuy = 7 - BalanceChangeRewardTransactionFee = 8 - BalanceChangeGasRefund = 9 - BalanceChangeTouchAccount = 10 + BalanceChangeRewardMineUncle BalanceChangeReason = 1 + BalanceChangeRewardMineBlock BalanceChangeReason = 2 + BalanceChangeDaoRefundContract BalanceChangeReason = 3 + BalanceChangeDaoAdjustBalance BalanceChangeReason = 4 + BalanceChangeTransfer BalanceChangeReason = 5 + BalanceChangeGenesisBalance BalanceChangeReason = 6 + BalanceChangeGasBuy BalanceChangeReason = 7 + BalanceChangeRewardTransactionFee BalanceChangeReason = 8 + BalanceChangeGasRefund BalanceChangeReason = 9 + BalanceChangeTouchAccount BalanceChangeReason = 10 // TODO: rename (debit, credit) // BalanceChangeSuicideRefund is added to the recipient as indicated by a selfdestructing account. - BalanceChangeSuicideRefund = 11 + BalanceChangeSuicideRefund BalanceChangeReason = 11 // BalanceChangeSuicideWithdraw is deducted from a contract due to self-destruct. // This can happen either at the point of self-destruction, or at the end of the tx // if ether was sent to contract post-selfdestruct. - BalanceChangeSuicideWithdraw = 12 + BalanceChangeSuicideWithdraw BalanceChangeReason = 12 // BalanceChangeBurn accounts for: // - EIP-1559 burnt fees // - ether that is sent to a self-destructed contract within the same tx (captured at end of tx) // Note it doesn't account for a self-destruct which appoints same contract as recipient. - BalanceChangeBurn = 13 + BalanceChangeBurn BalanceChangeReason = 13 // BalanceChangeBurnRefund is refunded to an account at the end of transaction based on // gas usage from the estimated burn amount. - BalanceChangeBurnRefund = 14 - BalanceChangeWithdrawal = 15 + BalanceChangeBurnRefund BalanceChangeReason = 14 + BalanceChangeWithdrawal BalanceChangeReason = 15 ) diff --git a/eth/tracers/live/printer.go b/eth/tracers/live/printer.go index 422b009e29..727dc3dc16 100644 --- a/eth/tracers/live/printer.go +++ b/eth/tracers/live/printer.go @@ -69,7 +69,6 @@ func (p *Printer) CaptureTxStart(env *vm.EVM, tx *types.Transaction, from common return } fmt.Printf("CaptureTxStart: tx=%s\n", buf) - } func (p *Printer) CaptureTxEnd(receipt *types.Receipt, err error) { diff --git a/eth/tracers/native/prestate.go b/eth/tracers/native/prestate.go index b59834ff5d..8608ab69dc 100644 --- a/eth/tracers/native/prestate.go +++ b/eth/tracers/native/prestate.go @@ -61,7 +61,6 @@ type prestateTracer struct { env *vm.EVM pre stateMap post stateMap - create bool to common.Address config prestateTracerConfig interrupt atomic.Bool // Atomic flag to signal execution interruption