aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-05-09 16:34:53 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2016-05-09 16:34:53 +0800
commitb6135a72dd01deb9ac68ee5fbcc92b61565dc9e6 (patch)
treec6fef04eecd02551bd721a470afb3d086a31469e
parent8aa4597c9e3f809f1e17f3d6922b865d6e13ec4d (diff)
parent7d59c5c58d93f97b8ee77f61811f2ad72f25388a (diff)
downloaddexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar.gz
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar.bz2
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar.lz
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar.xz
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.tar.zst
dexon-b6135a72dd01deb9ac68ee5fbcc92b61565dc9e6.zip
Merge pull request #2527 from obscuren/trace-transaction-fix
eth: fixed tracing functions using the current header instead of parent
-rw-r--r--eth/api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/api.go b/eth/api.go
index bd8179962..1d66f53fe 100644
--- a/eth/api.go
+++ b/eth/api.go
@@ -1841,7 +1841,7 @@ func (s *PrivateDebugAPI) TraceTransaction(txHash common.Hash, logger *vm.LogCon
}
// Mutate the state if we haven't reached the tracing transaction yet
if uint64(idx) < txIndex {
- vmenv := core.NewEnv(stateDb, s.config, s.eth.BlockChain(), msg, parent.Header(), vm.Config{})
+ vmenv := core.NewEnv(stateDb, s.config, s.eth.BlockChain(), msg, block.Header(), vm.Config{})
_, _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas()))
if err != nil {
return nil, fmt.Errorf("mutation failed: %v", err)
@@ -1849,7 +1849,7 @@ func (s *PrivateDebugAPI) TraceTransaction(txHash common.Hash, logger *vm.LogCon
continue
}
// Otherwise trace the transaction and return
- vmenv := core.NewEnv(stateDb, s.config, s.eth.BlockChain(), msg, parent.Header(), vm.Config{Debug: true, Logger: *logger})
+ vmenv := core.NewEnv(stateDb, s.config, s.eth.BlockChain(), msg, block.Header(), vm.Config{Debug: true, Logger: *logger})
ret, gas, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(tx.Gas()))
if err != nil {
return nil, fmt.Errorf("tracing failed: %v", err)