aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2017-01-05 18:52:10 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-01-05 18:52:10 +0800
commitbbc4ea4ae8e8a962deae3d5693d9d4a9376eab88 (patch)
treed4743eaa073d1bc7788f5d4fc3771da37f3cb0b5 /miner
parent2126d8148806b6d8597d6a1c761080e9dc98d745 (diff)
downloadgo-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar.gz
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar.bz2
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar.lz
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar.xz
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.tar.zst
go-tangerine-bbc4ea4ae8e8a962deae3d5693d9d4a9376eab88.zip
core/vm: improved EVM run loop & instruction calling (#3378)
The run loop, which previously contained custom opcode executes have been removed and has been simplified to a few checks. Each operation consists of 4 elements: execution function, gas cost function, stack validation function and memory size function. The execution function implements the operation's runtime behaviour, the gas cost function implements the operation gas costs function and greatly depends on the memory and stack, the stack validation function validates the stack and makes sure that enough items can be popped off and pushed on and the memory size function calculates the memory required for the operation and returns it. This commit also allows the EVM to go unmetered. This is helpful for offline operations such as contract calls.
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/miner/worker.go b/miner/worker.go
index f29566c0a..3ae51d120 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -616,7 +616,7 @@ func (env *Work) commitTransactions(mux *event.TypeMux, txs *types.TransactionsB
func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, gp *core.GasPool) (error, vm.Logs) {
snap := env.state.Snapshot()
- receipt, logs, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, env.header.GasUsed, vm.Config{})
+ receipt, _, err := core.ApplyTransaction(env.config, bc, gp, env.state, env.header, tx, env.header.GasUsed, vm.Config{})
if err != nil {
env.state.RevertToSnapshot(snap)
return err, nil
@@ -624,7 +624,7 @@ func (env *Work) commitTransaction(tx *types.Transaction, bc *core.BlockChain, g
env.txs = append(env.txs, tx)
env.receipts = append(env.receipts, receipt)
- return nil, logs
+ return nil, receipt.Logs
}
// TODO: remove or use