diff options
author | Péter Szilágyi <peterke@gmail.com> | 2019-02-20 16:48:12 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 16:48:12 +0800 |
commit | c942700427557e3ff6de3aaf6b916e2f056c1ec2 (patch) | |
tree | cadf68e7206d6de42b1eefc6967214cf86e35ff2 /eth/api_tracer.go | |
parent | 7fa3509e2eaf1a4ebc12344590e5699406690f15 (diff) | |
parent | cde35439e058b4f9579830fec9fb65ae0b998346 (diff) | |
download | dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar.gz dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar.bz2 dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar.lz dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar.xz dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.tar.zst dexon-c942700427557e3ff6de3aaf6b916e2f056c1ec2.zip |
Merge pull request #19029 from holiman/update1.8
Update1.8
Diffstat (limited to 'eth/api_tracer.go')
-rw-r--r-- | eth/api_tracer.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 0b8f8aa00..a3a0b4e1e 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -214,7 +214,8 @@ func (api *PrivateDebugAPI) traceChain(ctx context.Context, start, end *types.Bl log.Warn("Tracing failed", "hash", tx.Hash(), "block", task.block.NumberU64(), "err", err) break } - task.statedb.Finalise(true) + // Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect + task.statedb.Finalise(api.eth.blockchain.Config().IsEIP158(task.block.Number())) task.results[i] = &txTraceResult{Result: res} } // Stream the result back to the user or abort on teardown @@ -506,7 +507,8 @@ func (api *PrivateDebugAPI) traceBlock(ctx context.Context, block *types.Block, break } // Finalize the state so any modifications are written to the trie - statedb.Finalise(true) + // Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect + statedb.Finalise(vmenv.ChainConfig().IsEIP158(block.Number())) } close(jobs) pend.Wait() @@ -608,7 +610,8 @@ func (api *PrivateDebugAPI) standardTraceBlockToFile(ctx context.Context, block return dumps, err } // Finalize the state so any modifications are written to the trie - statedb.Finalise(true) + // Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect + statedb.Finalise(vmenv.ChainConfig().IsEIP158(block.Number())) // If we've traced the transaction we were looking for, abort if tx.Hash() == txHash { @@ -799,7 +802,8 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree return nil, vm.Context{}, nil, fmt.Errorf("transaction %#x failed: %v", tx.Hash(), err) } // Ensure any modifications are committed to the state - statedb.Finalise(true) + // Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect + statedb.Finalise(vmenv.ChainConfig().IsEIP158(block.Number())) } return nil, vm.Context{}, nil, fmt.Errorf("transaction index %d out of range for block %#x", txIndex, blockHash) } |