Skip to content

Commit

Permalink
removed setting RPC inspector in WithMessageIdFunction()
Browse files Browse the repository at this point in the history
  • Loading branch information
gomisha committed Jan 5, 2023
1 parent 84550e5 commit 11bb5a8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions insecure/corruptlibp2p/pubsub_adapter_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ func (c *CorruptPubSubAdapterConfig) WithAppSpecificRpcInspector(_ func(peer.ID,
}

func (c *CorruptPubSubAdapterConfig) WithMessageIdFunction(f func([]byte) string) {
if c.inspector != nil {
c.options = append(c.options, corrupt.WithAppSpecificRpcInspector(func(id peer.ID, rpc *corrupt.RPC) error {
return c.inspector(id, rpc)
}))
}

c.options = append(c.options, corrupt.WithMessageIdFn(func(pmsg *pb.Message) string {
return f(pmsg.Data)
}))
Expand Down

0 comments on commit 11bb5a8

Please sign in to comment.