@ -213,9 +213,6 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
// Initialise a new contract and set the code that is to be used by the EVM.
// Initialise a new contract and set the code that is to be used by the EVM.
// The contract is a scoped environment for this execution context only.
// The contract is a scoped environment for this execution context only.
code := evm . StateDB . GetCode ( addr )
code := evm . StateDB . GetCode ( addr )
if witness := evm . StateDB . Witness ( ) ; witness != nil {
witness . AddCode ( code )
}
if len ( code ) == 0 {
if len ( code ) == 0 {
ret , err = nil , nil // gas is unchanged
ret , err = nil , nil // gas is unchanged
} else {
} else {
@ -283,9 +280,6 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte,
// Initialise a new contract and set the code that is to be used by the EVM.
// Initialise a new contract and set the code that is to be used by the EVM.
// The contract is a scoped environment for this execution context only.
// The contract is a scoped environment for this execution context only.
contract := NewContract ( caller , AccountRef ( caller . Address ( ) ) , value , gas )
contract := NewContract ( caller , AccountRef ( caller . Address ( ) ) , value , gas )
if witness := evm . StateDB . Witness ( ) ; witness != nil {
witness . AddCode ( evm . StateDB . GetCode ( addrCopy ) )
}
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
ret , err = evm . interpreter . Run ( contract , input , false )
ret , err = evm . interpreter . Run ( contract , input , false )
gas = contract . Gas
gas = contract . Gas
@ -333,9 +327,6 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by
addrCopy := addr
addrCopy := addr
// Initialise a new contract and make initialise the delegate values
// Initialise a new contract and make initialise the delegate values
contract := NewContract ( caller , AccountRef ( caller . Address ( ) ) , nil , gas ) . AsDelegate ( )
contract := NewContract ( caller , AccountRef ( caller . Address ( ) ) , nil , gas ) . AsDelegate ( )
if witness := evm . StateDB . Witness ( ) ; witness != nil {
witness . AddCode ( evm . StateDB . GetCode ( addrCopy ) )
}
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
ret , err = evm . interpreter . Run ( contract , input , false )
ret , err = evm . interpreter . Run ( contract , input , false )
gas = contract . Gas
gas = contract . Gas
@ -391,9 +382,6 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte
// Initialise a new contract and set the code that is to be used by the EVM.
// Initialise a new contract and set the code that is to be used by the EVM.
// The contract is a scoped environment for this execution context only.
// The contract is a scoped environment for this execution context only.
contract := NewContract ( caller , AccountRef ( addrCopy ) , new ( uint256 . Int ) , gas )
contract := NewContract ( caller , AccountRef ( addrCopy ) , new ( uint256 . Int ) , gas )
if witness := evm . StateDB . Witness ( ) ; witness != nil {
witness . AddCode ( evm . StateDB . GetCode ( addrCopy ) )
}
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
contract . SetCallCode ( & addrCopy , evm . StateDB . GetCodeHash ( addrCopy ) , evm . StateDB . GetCode ( addrCopy ) )
// When an error was returned by the EVM or when setting the creation code
// When an error was returned by the EVM or when setting the creation code
// above we revert to the snapshot and consume any gas remaining. Additionally
// above we revert to the snapshot and consume any gas remaining. Additionally