mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Fix operation order during tracing suicide op code (#4409)
This commit is contained in:
parent
644d25d25d
commit
bd96c698a4
@ -837,10 +837,10 @@ func opSuicide(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]
|
||||
callerAddr := scope.Contract.Address()
|
||||
beneficiaryAddr := common.Address(beneficiary.Bytes20())
|
||||
balance := interpreter.evm.IntraBlockState().GetBalance(callerAddr)
|
||||
interpreter.evm.IntraBlockState().AddBalance(beneficiaryAddr, balance)
|
||||
if interpreter.evm.Config().Debug {
|
||||
interpreter.evm.Config().Tracer.CaptureSelfDestruct(callerAddr, beneficiaryAddr, balance.ToBig())
|
||||
}
|
||||
interpreter.evm.IntraBlockState().AddBalance(beneficiaryAddr, balance)
|
||||
interpreter.evm.IntraBlockState().Suicide(callerAddr)
|
||||
return nil, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user