|
|
|
@ -182,7 +182,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas |
|
|
|
|
return nil, gas, ErrDepth |
|
|
|
|
} |
|
|
|
|
// Fail if we're trying to transfer more than the available balance
|
|
|
|
|
if value.Sign() != 0 && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { |
|
|
|
|
if !value.IsZero() && !evm.Context.CanTransfer(evm.StateDB, caller.Address(), value) { |
|
|
|
|
return nil, gas, ErrInsufficientBalance |
|
|
|
|
} |
|
|
|
|
snapshot := evm.StateDB.Snapshot() |
|
|
|
@ -190,7 +190,7 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas |
|
|
|
|
debug := evm.Config.Tracer != nil |
|
|
|
|
|
|
|
|
|
if !evm.StateDB.Exist(addr) { |
|
|
|
|
if !isPrecompile && evm.chainRules.IsEIP158 && value.Sign() == 0 { |
|
|
|
|
if !isPrecompile && evm.chainRules.IsEIP158 && value.IsZero() { |
|
|
|
|
// Calling a non existing account, don't do anything, but ping the tracer
|
|
|
|
|
if debug { |
|
|
|
|
if evm.depth == 0 { |
|
|
|
|