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