fix lint issues

This commit is contained in:
Sina Mahmoodi 2023-12-11 14:17:29 +03:30
parent ddd1b0a63f
commit 0484068df5
3 changed files with 15 additions and 17 deletions

View file

@ -22,30 +22,30 @@ type BalanceChangeReason byte
const ( const (
BalanceChangeUnspecified BalanceChangeReason = 0 BalanceChangeUnspecified BalanceChangeReason = 0
BalanceChangeRewardMineUncle = 1 BalanceChangeRewardMineUncle BalanceChangeReason = 1
BalanceChangeRewardMineBlock = 2 BalanceChangeRewardMineBlock BalanceChangeReason = 2
BalanceChangeDaoRefundContract = 3 BalanceChangeDaoRefundContract BalanceChangeReason = 3
BalanceChangeDaoAdjustBalance = 4 BalanceChangeDaoAdjustBalance BalanceChangeReason = 4
BalanceChangeTransfer = 5 BalanceChangeTransfer BalanceChangeReason = 5
BalanceChangeGenesisBalance = 6 BalanceChangeGenesisBalance BalanceChangeReason = 6
BalanceChangeGasBuy = 7 BalanceChangeGasBuy BalanceChangeReason = 7
BalanceChangeRewardTransactionFee = 8 BalanceChangeRewardTransactionFee BalanceChangeReason = 8
BalanceChangeGasRefund = 9 BalanceChangeGasRefund BalanceChangeReason = 9
BalanceChangeTouchAccount = 10 BalanceChangeTouchAccount BalanceChangeReason = 10
// TODO: rename (debit, credit) // TODO: rename (debit, credit)
// BalanceChangeSuicideRefund is added to the recipient as indicated by a selfdestructing account. // 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. // 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 // 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. // if ether was sent to contract post-selfdestruct.
BalanceChangeSuicideWithdraw = 12 BalanceChangeSuicideWithdraw BalanceChangeReason = 12
// BalanceChangeBurn accounts for: // BalanceChangeBurn accounts for:
// - EIP-1559 burnt fees // - EIP-1559 burnt fees
// - ether that is sent to a self-destructed contract within the same tx (captured at end of tx) // - 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. // 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 // BalanceChangeBurnRefund is refunded to an account at the end of transaction based on
// gas usage from the estimated burn amount. // gas usage from the estimated burn amount.
BalanceChangeBurnRefund = 14 BalanceChangeBurnRefund BalanceChangeReason = 14
BalanceChangeWithdrawal = 15 BalanceChangeWithdrawal BalanceChangeReason = 15
) )

View file

@ -69,7 +69,6 @@ func (p *Printer) CaptureTxStart(env *vm.EVM, tx *types.Transaction, from common
return return
} }
fmt.Printf("CaptureTxStart: tx=%s\n", buf) fmt.Printf("CaptureTxStart: tx=%s\n", buf)
} }
func (p *Printer) CaptureTxEnd(receipt *types.Receipt, err error) { func (p *Printer) CaptureTxEnd(receipt *types.Receipt, err error) {

View file

@ -61,7 +61,6 @@ type prestateTracer struct {
env *vm.EVM env *vm.EVM
pre stateMap pre stateMap
post stateMap post stateMap
create bool
to common.Address to common.Address
config prestateTracerConfig config prestateTracerConfig
interrupt atomic.Bool // Atomic flag to signal execution interruption interrupt atomic.Bool // Atomic flag to signal execution interruption