diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-04-27 19:27:33 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-04-27 19:29:18 +0800 |
commit | 7a7428a027de03ad9e80e89a70818c692193e60a (patch) | |
tree | c6c40618954b558f50d82aa4b9522e01365cec9c /eth | |
parent | cfe8f5fd948954ccedd975b6630e455a4e5653db (diff) | |
download | go-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 'eth')
-rw-r--r-- | eth/api_tracer.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/api_tracer.go b/eth/api_tracer.go index 07c4457bc..80a3ab719 100644 --- a/eth/api_tracer.go +++ b/eth/api_tracer.go @@ -201,7 +201,7 @@ 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.DeleteSuicides() + task.statedb.Finalise(true) task.results[i] = &txTraceResult{Result: res} } // Stream the result back to the user or abort on teardown @@ -640,7 +640,8 @@ func (api *PrivateDebugAPI) computeTxEnv(blockHash common.Hash, txIndex int, ree if _, _, _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas())); err != nil { return nil, vm.Context{}, nil, fmt.Errorf("tx %x failed: %v", tx.Hash(), err) } - statedb.DeleteSuicides() + // Ensure any modifications are committed to the state + statedb.Finalise(true) } return nil, vm.Context{}, nil, fmt.Errorf("tx index %d out of range for block %x", txIndex, blockHash) } |