mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
cmd/evm/internal: check nil
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
aea5fe0ebb
commit
17455a1c84
1 changed files with 7 additions and 3 deletions
|
|
@ -224,7 +224,9 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
|
|||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
if tracer != nil {
|
||||
vmConfig.Tracer = tracer
|
||||
}
|
||||
statedb.SetTxContext(tx.Hash(), txIndex)
|
||||
|
||||
var (
|
||||
|
|
@ -248,9 +250,11 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
|
|||
return nil, nil, nil, NewError(ErrorMissingBlockhash, hashError)
|
||||
}
|
||||
gasUsed += msgResult.UsedGas
|
||||
if tracer != nil {
|
||||
if err := tracer.Write(); err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// Receipt:
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue