lotus/node/modules/lp2p/tracer.go
2021-08-30 14:35:15 +02:00

27 lines
590 B
Go

package lp2p
import (
peer "github.com/libp2p/go-libp2p-core/peer"
pubsub "github.com/libp2p/go-libp2p-pubsub"
pubsub_pb "github.com/libp2p/go-libp2p-pubsub/pb"
)
func newLotusTracer(tr pubsub.EventTracer) LotusTracer {
return &lotusTracer{
tr: tr,
}
}
type lotusTracer struct {
tr pubsub.EventTracer
}
type LotusTracer interface {
TracePeerScore(scores map[peer.ID]*pubsub.PeerScoreSnapshot)
Trace(evt *pubsub_pb.TraceEvent)
}
func (lt *lotusTracer) TracePeerScore(scores map[peer.ID]*pubsub.PeerScoreSnapshot) {}
func (lt *lotusTracer) Trace(evt *pubsub_pb.TraceEvent) {}