aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2016-10-06 22:14:22 +0800
committerGitHub <noreply@github.com>2016-10-06 22:14:22 +0800
commit7335a70a020517cc9cebe7ae82c0e49ba133abf1 (patch)
treecc63625fa07bf3fb28326a01d5c8255a83a83bd1 /eth
parent07caa3fccdfe11bbee084c043ac11e7cfae9a6b7 (diff)
parent3c836dd71b192de24774b1848173a4eb0ca9a63b (diff)
downloadgo-tangerine-7335a70a020517cc9cebe7ae82c0e49ba133abf1.tar.gz
go-tangerine-7335a70a020517cc9cebe7ae82c0e49ba133abf1.tar.zst
go-tangerine-7335a70a020517cc9cebe7ae82c0e49ba133abf1.zip
Merge pull request #3092 from fjl/state-journal
core/state: implement reverts by journaling all changes
Diffstat (limited to 'eth')
-rw-r--r--eth/api_backend.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/eth/api_backend.go b/eth/api_backend.go
index 4adeb0aa0..42b84bf9b 100644
--- a/eth/api_backend.go
+++ b/eth/api_backend.go
@@ -98,12 +98,12 @@ func (b *EthApiBackend) GetTd(blockHash common.Hash) *big.Int {
}
func (b *EthApiBackend) GetVMEnv(ctx context.Context, msg core.Message, state ethapi.State, header *types.Header) (vm.Environment, func() error, error) {
- stateDb := state.(EthApiState).state.Copy()
+ statedb := state.(EthApiState).state
addr, _ := msg.From()
- from := stateDb.GetOrNewStateObject(addr)
+ from := statedb.GetOrNewStateObject(addr)
from.SetBalance(common.MaxBig)
vmError := func() error { return nil }
- return core.NewEnv(stateDb, b.eth.chainConfig, b.eth.blockchain, msg, header, b.eth.chainConfig.VmConfig), vmError, nil
+ return core.NewEnv(statedb, b.eth.chainConfig, b.eth.blockchain, msg, header, b.eth.chainConfig.VmConfig), vmError, nil
}
func (b *EthApiBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error {