libp2p / go-libp2p-pubsub

The PubSub implementation for go-libp2p
https://github.com/libp2p/specs/tree/master/pubsub
Other
323 stars 187 forks source link

Adds Application Specific RPC Inspector #509

Closed yhassanzadeh13 closed 1 year ago

yhassanzadeh13 commented 1 year ago

This PR implements an application-specific RPC inspector for GossipSubRouter. This is an optional and auxilary call-back method that can be set by the application so that all accepted RPCs are inspected and only approved ones resume processing.

When there is no inspected set, handling an accepted RPC goes as normal. This app-specific RPC inspector allows the application developer to:

yhassanzadeh13 commented 1 year ago

Much better!

Lets move this to the base pubsub object, it is not limited to gossipsub!

@vyzo applied