@@ -213,9 +213,6 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
213
213
// Initialise a new contract and set the code that is to be used by the EVM.
214
214
// The contract is a scoped environment for this execution context only.
215
215
code := evm .StateDB .GetCode (addr )
216
- if witness := evm .StateDB .Witness (); witness != nil {
217
- witness .AddCode (code )
218
- }
219
216
if len (code ) == 0 {
220
217
ret , err = nil , nil // gas is unchanged
221
218
} else {
@@ -283,9 +280,6 @@ func (evm *EVM) CallCode(caller ContractRef, addr common.Address, input []byte,
283
280
// Initialise a new contract and set the code that is to be used by the EVM.
284
281
// The contract is a scoped environment for this execution context only.
285
282
contract := NewContract (caller , AccountRef (caller .Address ()), value , gas )
286
- if witness := evm .StateDB .Witness (); witness != nil {
287
- witness .AddCode (evm .StateDB .GetCode (addrCopy ))
288
- }
289
283
contract .SetCallCode (& addrCopy , evm .StateDB .GetCodeHash (addrCopy ), evm .StateDB .GetCode (addrCopy ))
290
284
ret , err = evm .interpreter .Run (contract , input , false )
291
285
gas = contract .Gas
@@ -333,9 +327,6 @@ func (evm *EVM) DelegateCall(caller ContractRef, addr common.Address, input []by
333
327
addrCopy := addr
334
328
// Initialise a new contract and make initialise the delegate values
335
329
contract := NewContract (caller , AccountRef (caller .Address ()), nil , gas ).AsDelegate ()
336
- if witness := evm .StateDB .Witness (); witness != nil {
337
- witness .AddCode (evm .StateDB .GetCode (addrCopy ))
338
- }
339
330
contract .SetCallCode (& addrCopy , evm .StateDB .GetCodeHash (addrCopy ), evm .StateDB .GetCode (addrCopy ))
340
331
ret , err = evm .interpreter .Run (contract , input , false )
341
332
gas = contract .Gas
@@ -391,9 +382,6 @@ func (evm *EVM) StaticCall(caller ContractRef, addr common.Address, input []byte
391
382
// Initialise a new contract and set the code that is to be used by the EVM.
392
383
// The contract is a scoped environment for this execution context only.
393
384
contract := NewContract (caller , AccountRef (addrCopy ), new (uint256.Int ), gas )
394
- if witness := evm .StateDB .Witness (); witness != nil {
395
- witness .AddCode (evm .StateDB .GetCode (addrCopy ))
396
- }
397
385
contract .SetCallCode (& addrCopy , evm .StateDB .GetCodeHash (addrCopy ), evm .StateDB .GetCode (addrCopy ))
398
386
// When an error was returned by the EVM or when setting the creation code
399
387
// above we revert to the snapshot and consume any gas remaining. Additionally
0 commit comments