mirror of
https://github.com/logos-messaging/go-libp2p-pubsub.git
synced 2026-01-05 22:33:10 +00:00
option to enable message signing
This commit is contained in:
parent
a6c349b6f0
commit
9d250aef37
@ -190,6 +190,13 @@ func WithValidateThrottle(n int) Option {
|
||||
}
|
||||
}
|
||||
|
||||
func WithMessageSigning() Option {
|
||||
return func(p *PubSub) error {
|
||||
p.signKey = p.host.Peerstore().PrivKey(p.host.ID())
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// processLoop handles all inputs arriving on the channels
|
||||
func (p *PubSub) processLoop(ctx context.Context) {
|
||||
defer func() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user