aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-04-27 19:27:33 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-04-27 19:29:18 +0800
commit7a7428a027de03ad9e80e89a70818c692193e60a (patch)
treec6c40618954b558f50d82aa4b9522e01365cec9c /core
parentcfe8f5fd948954ccedd975b6630e455a4e5653db (diff)
downloadgo-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar.gz
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar.bz2
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar.lz
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar.xz
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.tar.zst
go-tangerine-7a7428a027de03ad9e80e89a70818c692193e60a.zip
core, eth: fix tracer dirty finalization
Diffstat (limited to 'core')
-rw-r--r--core/state/statedb.go21
-rw-r--r--core/vm/evm.go5
2 files changed, 5 insertions, 21 deletions
diff --git a/core/state/statedb.go b/core/state/statedb.go
index 3ae6843d8..a952027d6 100644
--- a/core/state/statedb.go
+++ b/core/state/statedb.go
@@ -572,27 +572,6 @@ func (self *StateDB) Prepare(thash, bhash common.Hash, ti int) {
self.txIndex = ti
}
-// DeleteSuicides flags the suicided objects for deletion so that it
-// won't be referenced again when called / queried up on.
-//
-// DeleteSuicides should not be used for consensus related updates
-// under any circumstances.
-func (s *StateDB) DeleteSuicides() {
- // Reset refund so that any used-gas calculations can use this method.
- s.clearJournalAndRefund()
-
- for addr := range s.stateObjectsDirty {
- stateObject := s.stateObjects[addr]
-
- // If the object has been removed by a suicide
- // flag the object as deleted.
- if stateObject.suicided {
- stateObject.deleted = true
- }
- delete(s.stateObjectsDirty, addr)
- }
-}
-
func (s *StateDB) clearJournalAndRefund() {
s.journal = newJournal()
s.validRevisions = s.validRevisions[:0]
diff --git a/core/vm/evm.go b/core/vm/evm.go
index 96676c314..ea4620974 100644
--- a/core/vm/evm.go
+++ b/core/vm/evm.go
@@ -160,6 +160,11 @@ func (evm *EVM) Call(caller ContractRef, addr common.Address, input []byte, gas
precompiles = PrecompiledContractsByzantium
}
if precompiles[addr] == nil && evm.ChainConfig().IsEIP158(evm.BlockNumber) && value.Sign() == 0 {
+ // Calling a non existing account, don't do antything, but ping the tracer
+ if evm.vmConfig.Debug && evm.depth == 0 {
+ evm.vmConfig.Tracer.CaptureStart(caller.Address(), addr, false, input, gas, value)
+ evm.vmConfig.Tracer.CaptureEnd(ret, 0, 0, nil)
+ }
return nil, gas, nil
}
evm.StateDB.CreateAccount(addr)