option to enable message signing

This commit is contained in:
vyzo 2018-08-26 13:40:11 +03:00
parent a6c349b6f0
commit 9d250aef37

View File

@ -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() {