Address some minor review nits

This commit is contained in:
Łukasz Magiera 2020-02-25 21:25:52 +01:00
parent 1920981713
commit f1d9033194
2 changed files with 3 additions and 5 deletions

View File

@ -910,7 +910,7 @@ func (cs *ChainStore) GetRandomness(ctx context.Context, blks []cid.Cid, pers cr
span.AddAttributes(trace.Int64Attribute("round", round)) span.AddAttributes(trace.Int64Attribute("round", round))
defer func() { defer func() {
log.Warnf("getRand %v %d %d %x -> %x", blks, pers, round, entropy, out) log.Infof("getRand %v %d %d %x -> %x", blks, pers, round, entropy, out)
}() }()
for { for {

View File

@ -4,8 +4,6 @@ import (
"bytes" "bytes"
"context" "context"
"encoding/binary" "encoding/binary"
"fmt"
"os"
"runtime/debug" "runtime/debug"
"github.com/filecoin-project/go-address" "github.com/filecoin-project/go-address"
@ -55,12 +53,12 @@ func (rs *runtimeShim) shimCall(f func() interface{}) (rval []byte, aerr aerrors
defer func() { defer func() {
if r := recover(); r != nil { if r := recover(); r != nil {
if ar, ok := r.(aerrors.ActorError); ok { if ar, ok := r.(aerrors.ActorError); ok {
fmt.Fprintln(os.Stderr, "VM.Call failure: ", ar) log.Warn("VM.Call failure: ", ar)
debug.PrintStack() debug.PrintStack()
aerr = ar aerr = ar
return return
} }
fmt.Fprintln(os.Stderr, "caught one of those actor errors: ", r) log.Warn("caught one of those actor errors: ", r)
debug.PrintStack() debug.PrintStack()
log.Errorf("ERROR") log.Errorf("ERROR")
aerr = aerrors.Newf(1, "generic spec actors failure") aerr = aerrors.Newf(1, "generic spec actors failure")