Fix proto version
This commit is contained in:
parent
90c5ef3311
commit
b0c0e4b26e
@ -3,6 +3,9 @@ package secureservice
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"io"
|
||||
"net"
|
||||
|
||||
commonaccount "github.com/anyproto/any-sync/accountservice"
|
||||
"github.com/anyproto/any-sync/app"
|
||||
"github.com/anyproto/any-sync/app/logger"
|
||||
@ -13,8 +16,6 @@ import (
|
||||
"github.com/libp2p/go-libp2p/core/crypto"
|
||||
libp2ptls "github.com/libp2p/go-libp2p/p2p/security/tls"
|
||||
"go.uber.org/zap"
|
||||
"io"
|
||||
"net"
|
||||
)
|
||||
|
||||
const CName = "common.net.secure"
|
||||
@ -52,6 +53,7 @@ type secureService struct {
|
||||
}
|
||||
|
||||
func (s *secureService) Init(a *app.App) (err error) {
|
||||
s.protoVersion = ProtoVersion
|
||||
account := a.MustComponent(commonaccount.CName).(commonaccount.Service)
|
||||
peerKey, err := account.Account().PeerKey.Raw()
|
||||
if err != nil {
|
||||
@ -76,8 +78,6 @@ func (s *secureService) Init(a *app.App) (err error) {
|
||||
return
|
||||
}
|
||||
|
||||
s.protoVersion = ProtoVersion
|
||||
|
||||
log.Info("secure service init", zap.String("peerId", account.Account().PeerId))
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user