bump proto version as 1

This commit is contained in:
Sergey Cherepanov 2023-06-07 20:50:26 +02:00
parent 6c9d1b0e84
commit 065ff11983
No known key found for this signature in database
GPG Key ID: 87F8EDE8FBDF637C

View File

@ -21,6 +21,12 @@ const CName = "common.net.secure"
var log = logger.NewNamed(CName) var log = logger.NewNamed(CName)
const (
// ProtoVersion 0 - first any-sync version with raw tcp connections
// ProtoVersion 1 - version with yamux over tcp and quic
ProtoVersion = 1
)
func New() SecureService { func New() SecureService {
return &secureService{} return &secureService{}
} }
@ -70,6 +76,8 @@ 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
} }