Merge pull request #963 from filecoin-project/feat/small-cleanup

some log cleanup and an extra trace value
This commit is contained in:
Whyrusleeping 2019-12-18 00:06:43 +01:00 committed by GitHub
commit 0f7be020d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -1022,6 +1022,8 @@ func (syncer *Syncer) iterFullTipsets(ctx context.Context, headers []*types.TipS
ctx, span := trace.StartSpan(ctx, "iterFullTipsets")
defer span.End()
span.AddAttributes(trace.Int64Attribute("num_headers", int64(len(headers))))
windowSize := 200
for i := len(headers) - 1; i >= 0; {
fts, err := syncer.store.TryFillTipSet(headers[i])

View File

@ -20,6 +20,7 @@ func main() {
logging.SetLogLevel("swarm2", "WARN")
logging.SetLogLevel("bitswap", "WARN")
logging.SetLogLevel("pubsub", "WARN")
logging.SetLogLevel("connmgr", "WARN")
local := []*cli.Command{
DaemonCmd,

View File

@ -42,7 +42,7 @@ func Host(mctx helpers.MetricsCtx, lc fx.Lifecycle, params P2PHostIn) (RawHost,
return nil, fmt.Errorf("missing private key for node ID: %s", params.ID.Pretty())
}
opts := []libp2p.Option{libp2p.Identity(pkey), libp2p.Peerstore(params.Peerstore), libp2p.NoListenAddrs, libp2p.UserAgent("lotus-" + build.Version)}
opts := []libp2p.Option{libp2p.Identity(pkey), libp2p.Peerstore(params.Peerstore), libp2p.NoListenAddrs, libp2p.UserAgent("lotus-" + build.UserVersion)}
for _, o := range params.Opts {
opts = append(opts, o...)
}