mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Remove unneeded logging
This commit is contained in:
parent
9fa627cd54
commit
826069f50c
3 changed files with 2 additions and 19 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue