Remove unneeded logging

This commit is contained in:
Brandon Roberts 2023-09-20 20:04:57 -07:00
parent 9fa627cd54
commit 826069f50c
3 changed files with 2 additions and 19 deletions

View file

@ -1,8 +1,6 @@
package vm
import (
"log"
"github.com/ethereum/go-ethereum/common/math"
)
@ -18,8 +16,6 @@ func NewCoroutine(pc uint64, stack Stack) Coroutine {
}
func (co *Coroutine) ExecuteCoroutine(interpreter *EVMInterpreter, scope *ScopeContext) (ret []byte, err error) {
log.Println("ExecuteCoroutine: ", co.PC, co.Stack)
// Don't bother with the execution if there's no code.
if len(scope.Contract.Code) == 0 {
return nil, nil

View file

@ -579,8 +579,6 @@ func opSpawn(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
// Add coroutine to queue
scope.PushCoroutine(coroutine)
log.Printf("Spawned coroutine %v", coroutine)
return nil, nil
}
@ -824,15 +822,12 @@ func opYield(pc *uint64, interpreter *EVMInterpreter, scope *ScopeContext) ([]by
// Push coroutine to the stack
scope.PushCoroutine(coroutine)
log.Printf("Coroutine %d yielded with %v", coroutine.PC, coroutine.Stack)
// Call the next coroutine
nextCoroutine, err := scope.PopCoroutine()
if err != nil {
return nil, err
}
ret, err := nextCoroutine.ExecuteCoroutine(interpreter, scope)
log.Printf("Coroutine %d returned with %v", nextCoroutine.PC, ret)
nextCoroutine.ExecuteCoroutine(interpreter, scope)
return nil, errStopToken
}

View file

@ -18,7 +18,6 @@ package vm
import (
"errors"
log2 "log"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/math"
@ -61,16 +60,9 @@ func (scope *ScopeContext) AwaitTermination(interpreter *EVMInterpreter) {
coroutine, err := scope.PopCoroutine()
for err == nil {
// TODO: Propogate returns and errors?
ret, err2 := coroutine.ExecuteCoroutine(interpreter, scope)
if err2 != nil {
log2.Println("Coroutine execution failed", "error", err2)
}
if ret != nil {
log2.Println("Coroutine returned", "ret", ret)
}
coroutine.ExecuteCoroutine(interpreter, scope)
coroutine, err = scope.PopCoroutine()
log2.Println("Awaiting coroutine termination", "coroutine", coroutine, "err", err)
}
}