aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-03 00:22:33 +0800
committerobscuren <geffobscura@gmail.com>2014-12-03 00:22:33 +0800
commitcb4d168ecc9f6c2ecdb1a8f3308f8f3eb9f02376 (patch)
tree5bb3fa719fd1388573201b8baa92b90e790f720a /vm
parent5ebae82eeb3f5ecdffb96f9d692523d0b0d4f759 (diff)
downloaddexon-cb4d168ecc9f6c2ecdb1a8f3308f8f3eb9f02376.tar.gz
dexon-cb4d168ecc9f6c2ecdb1a8f3308f8f3eb9f02376.tar.zst
dexon-cb4d168ecc9f6c2ecdb1a8f3308f8f3eb9f02376.zip
Updated LOG to match proper gas in all cases
Diffstat (limited to 'vm')
-rw-r--r--vm/types.go8
-rw-r--r--vm/vm_debug.go5
2 files changed, 4 insertions, 9 deletions
diff --git a/vm/types.go b/vm/types.go
index 0b20fb655..530dbf400 100644
--- a/vm/types.go
+++ b/vm/types.go
@@ -163,8 +163,8 @@ const (
// 0xf0 range - closures
CREATE OpCode = 0xf0 + iota
CALL
- RETURN
CALLCODE
+ RETURN
// 0x70 range - other
SUICIDE = 0xff
@@ -309,12 +309,6 @@ var opCodeToString = map[OpCode]string{
SWAP15: "SWAP15",
SWAP16: "SWAP16",
- LOG0: "LOG0",
- LOG1: "LOG1",
- LOG2: "LOG2",
- LOG3: "LOG3",
- LOG4: "LOG4",
-
// 0xf0 range
CREATE: "CREATE",
CALL: "CALL",
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index ea94987d1..dbab8fbcb 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -165,10 +165,11 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
n := int(op - LOG0)
require(n + 2)
- mSize, mStart := stack.Peekn()
gas.Set(GasLog)
addStepGasUsage(new(big.Int).Mul(big.NewInt(int64(n)), GasLog))
- addStepGasUsage(new(big.Int).Add(mSize, mStart))
+
+ mSize, _ := stack.Peekn()
+ addStepGasUsage(mSize)
case EXP:
require(2)