Now! Thats what I call tracing! Vol 4

This commit is contained in:
whyrusleeping 2019-10-17 09:49:43 +09:00
parent 39e2f766c8
commit 7464cb5803
2 changed files with 4 additions and 2 deletions

View File

@ -7,11 +7,10 @@ import (
"fmt"
"sync"
"github.com/filecoin-project/go-lotus/chain/vm"
"github.com/filecoin-project/go-lotus/build"
"github.com/filecoin-project/go-lotus/chain/address"
"github.com/filecoin-project/go-lotus/chain/state"
"github.com/filecoin-project/go-lotus/chain/vm"
"go.opencensus.io/trace"
"go.uber.org/zap"

View File

@ -417,6 +417,9 @@ func (syncer *Syncer) minerIsValid(ctx context.Context, maddr address.Address, b
}
func (syncer *Syncer) validateTickets(ctx context.Context, mworker address.Address, tickets []*types.Ticket, base *types.TipSet) error {
ctx, span := trace.StartSpan(ctx, "validateTickets")
defer span.End()
if len(tickets) == 0 {
return xerrors.Errorf("block had no tickets")
}