aboutsummaryrefslogtreecommitdiffstats
path: root/vm/vm_debug.go
diff options
context:
space:
mode:
Diffstat (limited to 'vm/vm_debug.go')
-rw-r--r--vm/vm_debug.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index dbab8fbcb..91d3c55c1 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -35,7 +35,7 @@ func NewDebugVm(env Environment) *DebugVm {
lt = LogTyDiff
}
- return &DebugVm{env: env, logTy: lt, Recoverable: true}
+ return &DebugVm{env: env, logTy: lt, Recoverable: false}
}
func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
@@ -168,8 +168,10 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
gas.Set(GasLog)
addStepGasUsage(new(big.Int).Mul(big.NewInt(int64(n)), GasLog))
- mSize, _ := stack.Peekn()
+ mSize, mStart := stack.Peekn()
addStepGasUsage(mSize)
+
+ newMemSize = calcMemSize(mStart, mSize)
case EXP:
require(2)
@@ -755,10 +757,10 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
case LOG0, LOG1, LOG2, LOG3, LOG4:
n := int(op - LOG0)
topics := make([][]byte, n)
- mStart, mSize := stack.Pop().Int64(), stack.Pop().Int64()
+ mSize, mStart := stack.Pop().Int64(), stack.Pop().Int64()
data := mem.Geti(mStart, mSize)
for i := 0; i < n; i++ {
- topics[i] = stack.Pop().Bytes()
+ topics[i] = ethutil.LeftPadBytes(stack.Pop().Bytes(), 32)
}
log := &state.Log{closure.Address(), topics, data}