Merge pull request #862 from filecoin-project/feat/disable-headnotifs-default

Disable headnotifs default
This commit is contained in:
Jakub Sztandera 2019-12-11 16:12:45 +01:00 committed by GitHub
commit 98740e1a23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

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

View File

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