disable head notifs by default

This commit is contained in:
Łukasz Magiera 2019-12-11 16:08:50 +01:00
parent b2dd284a14
commit edd40895b8
2 changed files with 4 additions and 2 deletions

View File

@ -217,7 +217,6 @@ func Online() Option {
Override(RunBlockSyncKey, modules.RunBlockSync),
Override(RunPeerMgrKey, modules.RunPeerMgr),
Override(HandleIncomingBlocksKey, modules.HandleIncomingBlocks),
Override(HeadMetricsKey, metrics.SendHeadNotifs("")),
Override(new(*discovery.Local), discovery.NewLocal),
Override(new(discovery.PeerResolver), modules.RetrievalResolver),
@ -313,7 +312,9 @@ func ConfigFullNode(c interface{}) Option {
return Options(
ConfigCommon(&cfg.Common),
If(cfg.Metrics.HeadNotifs,
Override(HeadMetricsKey, metrics.SendHeadNotifs(cfg.Metrics.Nickname)),
),
If(cfg.Metrics.PubsubTracing,
Override(new(*pubsub.PubSub), lp2p.GossipSub(lp2p.PubsubTracer())),
),

View File

@ -42,6 +42,7 @@ type Libp2p struct {
type Metrics struct {
Nickname string
HeadNotifs bool
PubsubTracing bool
}