github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/scoring/noopConsumer.go (about) 1 package scoring 2 3 import "github.com/onflow/flow-go/network/p2p" 4 5 // NoopInvCtrlMsgNotifConsumer is a no-op implementation of the p2p.GossipSubInvCtrlMsgNotifConsumer interface. 6 // It is used to consume invalid control message notifications from the GossipSub pubsub system and take no action. 7 // It is mainly used for cases when the peer scoring system is disabled. 8 type NoopInvCtrlMsgNotifConsumer struct { 9 } 10 11 func NewNoopInvCtrlMsgNotifConsumer() *NoopInvCtrlMsgNotifConsumer { 12 return &NoopInvCtrlMsgNotifConsumer{} 13 } 14 15 var _ p2p.GossipSubInvCtrlMsgNotifConsumer = (*NoopInvCtrlMsgNotifConsumer)(nil) 16 17 func (n NoopInvCtrlMsgNotifConsumer) OnInvalidControlMessageNotification(_ *p2p.InvCtrlMsgNotif) { 18 // no-op 19 }