Skip to content
Snippets Groups Projects
Commit b755d1d0 authored by Sydney Anne Erickson's avatar Sydney Anne Erickson :chipmunk:
Browse files

Merge branch 'XX-3118/ClientVersion' into 'release'

Remove GetCurrentClientVersion

See merge request elixxir/comms!339
parents 607643a9 cc778147
No related branches found
No related tags found
1 merge request!58Revert "Modify waiting lock"
...@@ -71,10 +71,6 @@ func (s *MockRegistration) RegisterUser(registrationCode, ...@@ -71,10 +71,6 @@ func (s *MockRegistration) RegisterUser(registrationCode,
return nil, nil, nil return nil, nil, nil
} }
func (s *MockRegistration) GetCurrentClientVersion() (version string, err error) {
return "", nil
}
func (s *MockRegistration) CheckRegistration(msg *pb.RegisteredNodeCheck) (*pb.RegisteredNodeConfirmation, error) { func (s *MockRegistration) CheckRegistration(msg *pb.RegisteredNodeCheck) (*pb.RegisteredNodeConfirmation, error) {
return nil, nil return nil, nil
} }
...@@ -111,11 +107,6 @@ func (s *MockRegistrationError) RegisterUser(registrationCode, ...@@ -111,11 +107,6 @@ func (s *MockRegistrationError) RegisterUser(registrationCode,
return nil, nil, nil return nil, nil, nil
} }
func (s *MockRegistrationError) GetCurrentClientVersion() (version string, err error) {
return "", nil
}
func (s *MockRegistrationError) CheckRegistration(msg *pb.RegisteredNodeCheck) (*pb.RegisteredNodeConfirmation, error) { func (s *MockRegistrationError) CheckRegistration(msg *pb.RegisteredNodeCheck) (*pb.RegisteredNodeConfirmation, error) {
return nil, nil return nil, nil
} }
...@@ -17,7 +17,6 @@ import ( ...@@ -17,7 +17,6 @@ import (
jww "github.com/spf13/jwalterweatherman" jww "github.com/spf13/jwalterweatherman"
pb "gitlab.com/elixxir/comms/mixmessages" pb "gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/comms/messages"
"gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/ndf" "gitlab.com/xx_network/primitives/ndf"
"google.golang.org/grpc" "google.golang.org/grpc"
...@@ -56,37 +55,6 @@ func (c *Comms) SendRegistrationMessage(host *connect.Host, ...@@ -56,37 +55,6 @@ func (c *Comms) SendRegistrationMessage(host *connect.Host,
return result, ptypes.UnmarshalAny(resultMsg, result) return result, ptypes.UnmarshalAny(resultMsg, result)
} }
// Client -> Registration Send Function
func (c *Comms) SendGetCurrentClientVersionMessage(
host *connect.Host) (*pb.ClientVersion, error) {
// Create the Send Function
f := func(conn *grpc.ClientConn) (*any.Any, error) {
// Set up the context
ctx, cancel := connect.MessagingContext()
defer cancel()
// Send the message
resultMsg, err := pb.NewRegistrationClient(
conn).GetCurrentClientVersion(ctx, &messages.Ping{})
if err != nil {
return nil, errors.New(err.Error())
}
return ptypes.MarshalAny(resultMsg)
}
// Execute the Send function
jww.TRACE.Printf("Sending Get Client Version message...")
resultMsg, err := c.Send(host, f)
if err != nil {
return nil, err
}
// Marshall the result
result := &pb.ClientVersion{}
return result, ptypes.UnmarshalAny(resultMsg, result)
}
// RequestNdf is used to Request an ndf from permissioning // RequestNdf is used to Request an ndf from permissioning
// Used by gateway, client, nodes and gateways // Used by gateway, client, nodes and gateways
func (c *Comms) RequestNdf(host *connect.Host, func (c *Comms) RequestNdf(host *connect.Host,
......
...@@ -45,34 +45,6 @@ func TestSendRegistrationMessage(t *testing.T) { ...@@ -45,34 +45,6 @@ func TestSendRegistrationMessage(t *testing.T) {
} }
} }
// Smoke test SendCheckClientVersion
func TestSendCheckClientVersionMessage(t *testing.T) {
GatewayAddress := getNextAddress()
testId := id.NewIdFromString("test", id.Generic, t)
clientId := id.NewIdFromString("client", id.Generic, t)
rg := registration.StartRegistrationServer(testId, GatewayAddress,
registration.NewImplementation(), nil, nil)
defer rg.Shutdown()
c, err := NewClientComms(clientId, nil, nil, nil)
if err != nil {
t.Errorf("Can't create client comms: %+v", err)
}
manager := connect.NewManagerTesting(t)
params := connect.GetDefaultHostParams()
params.AuthEnabled = false
host, err := manager.AddHost(testId, GatewayAddress, nil, params)
if err != nil {
t.Errorf("Unable to call NewHost: %+v", err)
}
_, err = c.SendGetCurrentClientVersionMessage(host)
if err != nil {
t.Errorf("CheckClientVersion: Error received: %s", err)
}
}
//Smoke test RequestNdf //Smoke test RequestNdf
func TestSendGetUpdatedNDF(t *testing.T) { func TestSendGetUpdatedNDF(t *testing.T) {
GatewayAddress := getNextAddress() GatewayAddress := getNextAddress()
......
...@@ -14,7 +14,7 @@ require ( ...@@ -14,7 +14,7 @@ require (
gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a
gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6 gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6
gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135 gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135
gitlab.com/xx_network/primitives v0.0.4-0.20210303180604-1ee442e6463f gitlab.com/xx_network/primitives v0.0.4-0.20210308175329-436b0c8753ea
gitlab.com/xx_network/ring v0.0.2 gitlab.com/xx_network/ring v0.0.2
golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d golang.org/x/net v0.0.0-20201029221708-28c70e62bb1d
golang.org/x/sys v0.0.0-20201029080932-201ba4db2418 // indirect golang.org/x/sys v0.0.0-20201029080932-201ba4db2418 // indirect
......
...@@ -66,77 +66,28 @@ github.com/zeebo/pcg v1.0.0 h1:dt+dx+HvX8g7Un32rY9XWoYnd0NmKmrIzpHF7qiTDj0= ...@@ -66,77 +66,28 @@ github.com/zeebo/pcg v1.0.0 h1:dt+dx+HvX8g7Un32rY9XWoYnd0NmKmrIzpHF7qiTDj0=
github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= github.com/zeebo/pcg v1.0.0/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c=
gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA=
gitlab.com/elixxir/crypto v0.0.6/go.mod h1:V8lricBRpa8v1ySymXQ1/lsb+8/lSak5S7ZWRT6OACY=
gitlab.com/elixxir/crypto v0.0.7-0.20210223210315-b2072c080b0f h1:VQDGEmfw6CLfmiN2asiNOJrodkDEGYVXDBDNfXsjTmk=
gitlab.com/elixxir/crypto v0.0.7-0.20210223210315-b2072c080b0f/go.mod h1:onm3bf+h/yIza245YXHuUW2hUQ1Ga8K4doXk5AKnrgg=
gitlab.com/elixxir/crypto v0.0.7-0.20210225184707-8e497d2c904e h1:Fi919Ok5I7T/Tvfx92DqKBTJtZ6Lu/oXebECTJP1X6M=
gitlab.com/elixxir/crypto v0.0.7-0.20210225184707-8e497d2c904e/go.mod h1:U2TLWU4foXsR8dz6NPmiQMNl2uNs/hEXYZozZ7VG9MA=
gitlab.com/elixxir/crypto v0.0.7-0.20210226164631-dd11d922075b h1:Ii2nSjjozj2V5uHTMGDemk1ydxP65+c7Hw3bK+/l3UA=
gitlab.com/elixxir/crypto v0.0.7-0.20210226164631-dd11d922075b/go.mod h1:U2TLWU4foXsR8dz6NPmiQMNl2uNs/hEXYZozZ7VG9MA=
gitlab.com/elixxir/crypto v0.0.7-0.20210226172354-61ccadb9e62b h1:VkjVWGC2MujUQvO3sjYdqrG5/7zq+wwqQS4skKn6qV8=
gitlab.com/elixxir/crypto v0.0.7-0.20210226172354-61ccadb9e62b/go.mod h1:7t9lAZ+u4XOySQjYnztilt1BMVyn7oFK20X+5BwZw4M=
gitlab.com/elixxir/crypto v0.0.7-0.20210226175801-f490fc89ffdd h1:g+iUT5g6NTwJwrYH/WhNWHewsR+5aT2H4a7Z6XhJCkc=
gitlab.com/elixxir/crypto v0.0.7-0.20210226175801-f490fc89ffdd/go.mod h1:uZbXF752F/P/jtwR9ekubmGNtbqFLordc5VqLGnqEKo=
gitlab.com/elixxir/crypto v0.0.7-0.20210305221450-c94429c34886 h1:Jt1PV/plsHrb/mK92HVgu+OF9PBDamp8GdbsGj0OexY= gitlab.com/elixxir/crypto v0.0.7-0.20210305221450-c94429c34886 h1:Jt1PV/plsHrb/mK92HVgu+OF9PBDamp8GdbsGj0OexY=
gitlab.com/elixxir/crypto v0.0.7-0.20210305221450-c94429c34886/go.mod h1:ugRjIGSOJJvVKGfIDpS/k62yeG4cTIrS/YNLqmpEIDM= gitlab.com/elixxir/crypto v0.0.7-0.20210305221450-c94429c34886/go.mod h1:ugRjIGSOJJvVKGfIDpS/k62yeG4cTIrS/YNLqmpEIDM=
gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg=
gitlab.com/elixxir/primitives v0.0.0-20200804170709-a1896d262cd9/go.mod h1:p0VelQda72OzoUckr1O+vPW0AiFe0nyKQ6gYcmFSuF8= gitlab.com/elixxir/primitives v0.0.0-20200804170709-a1896d262cd9/go.mod h1:p0VelQda72OzoUckr1O+vPW0AiFe0nyKQ6gYcmFSuF8=
gitlab.com/elixxir/primitives v0.0.0-20200804182913-788f47bded40/go.mod h1:tzdFFvb1ESmuTCOl1z6+yf6oAICDxH2NPUemVgoNLxc= gitlab.com/elixxir/primitives v0.0.0-20200804182913-788f47bded40/go.mod h1:tzdFFvb1ESmuTCOl1z6+yf6oAICDxH2NPUemVgoNLxc=
gitlab.com/elixxir/primitives v0.0.1/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE= gitlab.com/elixxir/primitives v0.0.1/go.mod h1:kNp47yPqja2lHSiS4DddTvFpB/4D9dB2YKnw5c+LJCE=
gitlab.com/elixxir/primitives v0.0.2/go.mod h1:3fxFHSlQhkV4vs+S0dZEz3Om3m+40WX8L806yvSnNFc=
gitlab.com/elixxir/primitives v0.0.3-0.20201116174806-97f190989704/go.mod h1:3fxFHSlQhkV4vs+S0dZEz3Om3m+40WX8L806yvSnNFc=
gitlab.com/elixxir/primitives v0.0.3-0.20210223210226-cccb5f7d4839 h1:BvHO58ibn08sxll46vLIngFf37Ab76GV3xC+DM2m/Uo=
gitlab.com/elixxir/primitives v0.0.3-0.20210223210226-cccb5f7d4839/go.mod h1:LnvSPo0OMyHV4YMtnFelXwPu2UtU38h6DZrwUry6fjU=
gitlab.com/elixxir/primitives v0.0.3-0.20210225041422-ada5b068c1e3 h1:hh3Y9kpGsw9VLqRodMIdyaJs/Onu73uktnkgwKZkmF4=
gitlab.com/elixxir/primitives v0.0.3-0.20210225041422-ada5b068c1e3/go.mod h1:LnvSPo0OMyHV4YMtnFelXwPu2UtU38h6DZrwUry6fjU=
gitlab.com/elixxir/primitives v0.0.3-0.20210225184649-54d1b20caf89 h1:QUsHdlu2EChCkoRE1bkvgwDLg2GiAEqbkulcBwHC6Hw=
gitlab.com/elixxir/primitives v0.0.3-0.20210225184649-54d1b20caf89/go.mod h1:EFEqF5PgiaV28i3fufmF0Wie84MiViBp/7KN1/Pjf48=
gitlab.com/elixxir/primitives v0.0.3-0.20210226172337-12a5b835ae9c h1:gNjyTBXqtQDCa9S/EW0a/ozKRjVjp3bSekmhsVQw4s8=
gitlab.com/elixxir/primitives v0.0.3-0.20210226172337-12a5b835ae9c/go.mod h1:eXAPFIUFFWuXY/KbwZ4/4mlciSavH92J2uu1jEyfw20=
gitlab.com/elixxir/primitives v0.0.3-0.20210226175744-d424cb7261fd h1:+hvXICaSkRunNOVS9kK/SOkNWCK2GCnOBearnPE8Osg=
gitlab.com/elixxir/primitives v0.0.3-0.20210226175744-d424cb7261fd/go.mod h1:l4DczasdfnrLdf2qimxOlJjr0RpcMzSwVCZXN3wxSzM=
gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a h1:NxCES61c3ycIAG76/dAKDTZvzxvh8szcL+RTX+6Wldw= gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a h1:NxCES61c3ycIAG76/dAKDTZvzxvh8szcL+RTX+6Wldw=
gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a/go.mod h1:7o0Gcvq6tE2by2hZyd0CDueOLUQGfbcuStnQEtLc56Y= gitlab.com/elixxir/primitives v0.0.3-0.20210305221357-0b3f19cc3c8a/go.mod h1:7o0Gcvq6tE2by2hZyd0CDueOLUQGfbcuStnQEtLc56Y=
gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw=
gitlab.com/xx_network/comms v0.0.3/go.mod h1:YViGbRj7FjJYoaO4NpALGEd9dK/l8uUT000FEBbUTL8=
gitlab.com/xx_network/comms v0.0.4-0.20210224201327-b0ce36c0c989 h1:Na1krYc+uLnEzc/nqdkpNL4oTw2obixEzhGzVFVboJw=
gitlab.com/xx_network/comms v0.0.4-0.20210224201327-b0ce36c0c989/go.mod h1:H10pJ7id+76aJeC1zP9F/N8cFBj1KtmkWHAmDILwZMw=
gitlab.com/xx_network/comms v0.0.4-0.20210225184643-04d57ac38237 h1:+C3F1UVPjZXYWZNJypsDU96gg91hI8175v6JMgjGWyE=
gitlab.com/xx_network/comms v0.0.4-0.20210225184643-04d57ac38237/go.mod h1:AGAzsdmfNrBzILC/Pgl8M/52BwTplxGjmh63ORXGiRo=
gitlab.com/xx_network/comms v0.0.4-0.20210226172330-06c9cfcbe7a9 h1:bNjojVotEv7v1lj7gRp8fr4lIoHcB0vnqnIs2etB2IA=
gitlab.com/xx_network/comms v0.0.4-0.20210226172330-06c9cfcbe7a9/go.mod h1:TiRi6zfzwPrs6ZYWaNcSAYUG8a1cWC9S32iDCZ0v0Rw=
gitlab.com/xx_network/comms v0.0.4-0.20210226175738-04b6c562dd2f h1:VAsZYilkD93YYdGq9LhaAWacQT15sFS6vGWGpeUbp/Y=
gitlab.com/xx_network/comms v0.0.4-0.20210226175738-04b6c562dd2f/go.mod h1:oTQ3YCqegm+b+5GrH1Z6EDKGmvuCD7+Xz+6rJnTAYa0=
gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6 h1:poMXjv5/r9TAQ2l0c1HfpMAoG6ASjitUbeS/FZnf3JI= gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6 h1:poMXjv5/r9TAQ2l0c1HfpMAoG6ASjitUbeS/FZnf3JI=
gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6/go.mod h1:bs4GLnnL1UqInyjT4MbHamgTpiTLNtdC5e61CCnVapo= gitlab.com/xx_network/comms v0.0.4-0.20210305221336-a7e28febdbf6/go.mod h1:bs4GLnnL1UqInyjT4MbHamgTpiTLNtdC5e61CCnVapo=
gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE=
gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk=
gitlab.com/xx_network/crypto v0.0.5-0.20201124194022-366c10b1bce0/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk=
gitlab.com/xx_network/crypto v0.0.5-0.20210223210125-9c1a8a8f1ec6 h1:VOHKnXEeNsE7HV6jXRAnitaMz4Bk9+HNeGD65/Y14YM=
gitlab.com/xx_network/crypto v0.0.5-0.20210223210125-9c1a8a8f1ec6/go.mod h1:hv5iBFSfmrhTkS8cAu1+/SlXXDzpHhZou+cgBSf8hAI=
gitlab.com/xx_network/crypto v0.0.5-0.20210225184630-793a5fc60d3a h1:18Qh+gJUjzehlSovwqFZe5RgKXc9kwTdZZodnhpxVpc=
gitlab.com/xx_network/crypto v0.0.5-0.20210225184630-793a5fc60d3a/go.mod h1:N79AXIqQKlIadtWvjUBZztzyR6RVxkeOys6xHgkWxYM=
gitlab.com/xx_network/crypto v0.0.5-0.20210226172317-cc20fe85f961 h1:Er4Rzcx2mYsWIS439ZrubN4E8//c8LjCnpKOin7IKs8=
gitlab.com/xx_network/crypto v0.0.5-0.20210226172317-cc20fe85f961/go.mod h1:p5b1CN+4j5mbZg3HvxGJqwJygTbcLxWHn0V70PUD1ks=
gitlab.com/xx_network/crypto v0.0.5-0.20210226175725-80576a407b2d h1:/kmAjGg0H9B7UHhbYuqkhrFqp+o2SPTPeTUQEUOn1MA=
gitlab.com/xx_network/crypto v0.0.5-0.20210226175725-80576a407b2d/go.mod h1:GJQ9ing4GrS/VRDC7PqmTU0SXNBAkOg0gsy9VHRjgKQ=
gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135 h1:2QuO+5VZerO5hLNNdU9N9jX4Xa20aHs1h15RMNbgONY= gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135 h1:2QuO+5VZerO5hLNNdU9N9jX4Xa20aHs1h15RMNbgONY=
gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135/go.mod h1:Kg4EgRbpzHjxavzuKP9E1JEgYBT0ez80rFtB7Bwuw+g= gitlab.com/xx_network/crypto v0.0.5-0.20210305221255-f0ef174f5135/go.mod h1:Kg4EgRbpzHjxavzuKP9E1JEgYBT0ez80rFtB7Bwuw+g=
gitlab.com/xx_network/primitives v0.0.0-20200803231956-9b192c57ea7c/go.mod h1:wtdCMr7DPePz9qwctNoAUzZtbOSHSedcK++3Df3psjA= gitlab.com/xx_network/primitives v0.0.0-20200803231956-9b192c57ea7c/go.mod h1:wtdCMr7DPePz9qwctNoAUzZtbOSHSedcK++3Df3psjA=
gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK9xevzWCaPO7b1wiluVJGk7R5ZsuC7pHY5hteZFQug= gitlab.com/xx_network/primitives v0.0.0-20200804183002-f99f7a7284da/go.mod h1:OK9xevzWCaPO7b1wiluVJGk7R5ZsuC7pHY5hteZFQug=
gitlab.com/xx_network/primitives v0.0.2/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc= gitlab.com/xx_network/primitives v0.0.2/go.mod h1:cs0QlFpdMDI6lAo61lDRH2JZz+3aVkHy+QogOB6F/qc=
gitlab.com/xx_network/primitives v0.0.4-0.20210219231511-983054dbee36 h1:41qeW7XB9Rllsi6fe37+eaQCLjTGchpvcJqwEvZxeXE=
gitlab.com/xx_network/primitives v0.0.4-0.20210219231511-983054dbee36/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210225002641-4e446b2531ea h1:8Kq5/7x4uMOrda8jWKnbe9ynNahd7Vkfe0ETijdM17s=
gitlab.com/xx_network/primitives v0.0.4-0.20210225002641-4e446b2531ea/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210226002915-98505d29e226 h1:/Mpf0JU9Nnoh1qkx6OzJyhCMjmyg9eAfNtVSJkYHIpc=
gitlab.com/xx_network/primitives v0.0.4-0.20210226002915-98505d29e226/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210226165312-9df25e918a42 h1:MRQC299UNMTkhe1sUfJ1m0dUq6dV2NbyyVVpjZTF1WY=
gitlab.com/xx_network/primitives v0.0.4-0.20210226165312-9df25e918a42/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210226175628-2b2742ebb772 h1:ChhVo8Q9YyTD+VylDIxcTFzasC1GtexUTIj+9auq4P8=
gitlab.com/xx_network/primitives v0.0.4-0.20210226175628-2b2742ebb772/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210303180604-1ee442e6463f h1:nC87BCbInkGS2iG5Z1g5PJC7gNKGgLlJmcMVYmsf7mo= gitlab.com/xx_network/primitives v0.0.4-0.20210303180604-1ee442e6463f h1:nC87BCbInkGS2iG5Z1g5PJC7gNKGgLlJmcMVYmsf7mo=
gitlab.com/xx_network/primitives v0.0.4-0.20210303180604-1ee442e6463f/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE= gitlab.com/xx_network/primitives v0.0.4-0.20210303180604-1ee442e6463f/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/primitives v0.0.4-0.20210308175329-436b0c8753ea h1:ljUr+XDu+8aD0ua7Q8ffd/ibEmyxDS6/+FqkHBoeb9U=
gitlab.com/xx_network/primitives v0.0.4-0.20210308175329-436b0c8753ea/go.mod h1:9imZHvYwNFobxueSvVtHneZLk9wTK7HQTzxPm+zhFhE=
gitlab.com/xx_network/ring v0.0.2 h1:TlPjlbFdhtJrwvRgIg4ScdngMTaynx/ByHBRZiXCoL0= gitlab.com/xx_network/ring v0.0.2 h1:TlPjlbFdhtJrwvRgIg4ScdngMTaynx/ByHBRZiXCoL0=
gitlab.com/xx_network/ring v0.0.2/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM= gitlab.com/xx_network/ring v0.0.2/go.mod h1:aLzpP2TiZTQut/PVHR40EJAomzugDdHXetbieRClXIM=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
......
This diff is collapsed.
...@@ -268,6 +268,8 @@ message GatewayPoll { ...@@ -268,6 +268,8 @@ message GatewayPoll {
// Define range for ClientBloomFilter searches // Define range for ClientBloomFilter searches
int64 StartTimestamp = 4; int64 StartTimestamp = 4;
int64 EndTimestamp = 5; int64 EndTimestamp = 5;
bytes ClientVersion = 6;
} }
// Unified Client->Gateway polling response // Unified Client->Gateway polling response
...@@ -327,10 +329,6 @@ service Registration { ...@@ -327,10 +329,6 @@ service Registration {
rpc RegisterUser (UserRegistration) returns (UserRegistrationConfirmation) { rpc RegisterUser (UserRegistration) returns (UserRegistrationConfirmation) {
} }
// Client uses this to check if the version needs to be updated
rpc GetCurrentClientVersion (messages.Ping) returns (ClientVersion) {
}
// Node registration for the permissioning server // Node registration for the permissioning server
rpc RegisterNode (NodeRegistration) returns (messages.Ack) { rpc RegisterNode (NodeRegistration) returns (messages.Ack) {
} }
......
...@@ -64,18 +64,6 @@ func (r *Comms) RegisterUser(ctx context.Context, msg *pb.UserRegistration) ( ...@@ -64,18 +64,6 @@ func (r *Comms) RegisterUser(ctx context.Context, msg *pb.UserRegistration) (
}, err }, err
} }
// CheckClientVersion event handler which checks whether the client library
// version is compatible with the network
func (r *Comms) GetCurrentClientVersion(ctx context.Context, ping *messages.Ping) (*pb.ClientVersion, error) {
version, err := r.handler.GetCurrentClientVersion()
// Return the confirmation message
return &pb.ClientVersion{
Version: version,
}, err
}
// Handle a node registration event // Handle a node registration event
func (r *Comms) RegisterNode(ctx context.Context, msg *pb.NodeRegistration) ( func (r *Comms) RegisterNode(ctx context.Context, msg *pb.NodeRegistration) (
*messages.Ack, error) { *messages.Ack, error) {
......
...@@ -64,7 +64,6 @@ func StartRegistrationServer(id *id.ID, localServer string, handler Handler, ...@@ -64,7 +64,6 @@ func StartRegistrationServer(id *id.ID, localServer string, handler Handler,
type Handler interface { type Handler interface {
RegisterUser(registrationCode, ClientReceptionRSAPubKey string, RegisterUser(registrationCode, ClientReceptionRSAPubKey string,
ClientReceptionSignedByServer string) (signature []byte, receptionSignature []byte, err error) ClientReceptionSignedByServer string) (signature []byte, receptionSignature []byte, err error)
GetCurrentClientVersion() (version string, err error)
RegisterNode(salt []byte, serverAddr, serverTlsCert, gatewayAddr, RegisterNode(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
gatewayTlsCert, registrationCode string) error gatewayTlsCert, registrationCode string) error
PollNdf(ndfHash []byte) ([]byte, error) PollNdf(ndfHash []byte) ([]byte, error)
...@@ -76,7 +75,6 @@ type Handler interface { ...@@ -76,7 +75,6 @@ type Handler interface {
type implementationFunctions struct { type implementationFunctions struct {
RegisterUser func(registrationCode, ClientReceptionRSAPubKey string, RegisterUser func(registrationCode, ClientReceptionRSAPubKey string,
ClientReceptionSignedByServer string) (signature, receptionSignature []byte, err error) ClientReceptionSignedByServer string) (signature, receptionSignature []byte, err error)
GetCurrentClientVersion func() (version string, err error)
RegisterNode func(salt []byte, serverAddr, serverTlsCert, gatewayAddr, RegisterNode func(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
gatewayTlsCert, registrationCode string) error gatewayTlsCert, registrationCode string) error
PollNdf func(ndfHash []byte) ([]byte, error) PollNdf func(ndfHash []byte) ([]byte, error)
...@@ -106,10 +104,6 @@ func NewImplementation() *Implementation { ...@@ -106,10 +104,6 @@ func NewImplementation() *Implementation {
warn(um) warn(um)
return nil, nil, nil return nil, nil, nil
}, },
GetCurrentClientVersion: func() (version string, err error) {
warn(um)
return "", nil
},
RegisterNode: func(salt []byte, serverAddr, serverTlsCert, gatewayAddr, RegisterNode: func(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
gatewayTlsCert, registrationCode string) error { gatewayTlsCert, registrationCode string) error {
warn(um) warn(um)
...@@ -139,10 +133,6 @@ func (s *Implementation) RegisterUser(registrationCode, ...@@ -139,10 +133,6 @@ func (s *Implementation) RegisterUser(registrationCode,
return s.Functions.RegisterUser(registrationCode, pubKey, reptPubKey) return s.Functions.RegisterUser(registrationCode, pubKey, reptPubKey)
} }
func (s *Implementation) GetCurrentClientVersion() (string, error) {
return s.Functions.GetCurrentClientVersion()
}
func (s *Implementation) RegisterNode(salt []byte, serverAddr, serverTlsCert, gatewayAddr, func (s *Implementation) RegisterNode(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
gatewayTlsCert, registrationCode string) error { gatewayTlsCert, registrationCode string) error {
return s.Functions.RegisterNode(salt, serverAddr, serverTlsCert, gatewayAddr, return s.Functions.RegisterNode(salt, serverAddr, serverTlsCert, gatewayAddr,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment