From 826069f50c89e8cbb3700aaf1156933f9ee1086c Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Wed, 20 Sep 2023 20:04:57 -0700 Subject: [PATCH] Remove unneeded logging --- core/vm/coroutine.go | 4 ---- core/vm/instructions.go | 7 +------ core/vm/interpreter.go | 10 +--------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/core/vm/coroutine.go b/core/vm/coroutine.go index 3ec48a1268..d7e0684462 100644 --- a/core/vm/coroutine.go +++ b/core/vm/coroutine.go @@ -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 diff --git a/core/vm/instructions.go b/core/vm/instructions.go index de121ec608..db58a0ec3e 100644 --- a/core/vm/instructions.go +++ b/core/vm/instructions.go @@ -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 } diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go index 83ac58db6a..f431ab8fec 100644 --- a/core/vm/interpreter.go +++ b/core/vm/interpreter.go @@ -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) } }