Skip to content

Commit

Permalink
rpc version
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Oct 24, 2024
1 parent 4473995 commit a493115
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion finality-provider/service/rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (r *rpcServer) RegisterWithGrpcServer(grpcServer *grpc.Server) error {
func (r *rpcServer) GetInfo(context.Context, *proto.GetInfoRequest) (*proto.GetInfoResponse, error) {

return &proto.GetInfoResponse{
Version: version.Version(),
Version: version.VersionRpc(),
}, nil
}

Expand Down
6 changes: 6 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package version

import (
"fmt"
"runtime/debug"
)

Expand Down Expand Up @@ -38,3 +39,8 @@ func CommitInfo() (hash string, timestamp string) {
func Version() string {
return version
}

func VersionRpc() string {
commit, ts := CommitInfo()
return fmt.Sprintf("version: %s, commit: %s, timestamp: %s ", version, commit, ts)
}

0 comments on commit a493115

Please sign in to comment.