Skip to content

Commit

Permalink
Add both versions of getVersionInfo in
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Oct 23, 2024
1 parent 6a7a9d5 commit 46f3cb3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion cmd/soroban-rpc/internal/methods/get_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,8 @@ type PaginationOptions struct {
type GetEventsResponse struct {
Events []EventInfo `json:"events"`
LatestLedger uint32 `json:"latestLedger"`
// Cursor represents last populated event ID if total events reach the limit or end of the search window
// Cursor represents last populated event ID if total events reach the limit
// or end of the search window
Cursor string `json:"cursor"`
}

Expand Down
28 changes: 18 additions & 10 deletions cmd/soroban-rpc/internal/methods/get_version_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ import (
)

type GetVersionInfoResponse struct {
Version string `json:"version"`
CommitHash string `json:"commitHash"`
BuildTimestamp string `json:"buildTimestamp"`
CaptiveCoreVersion string `json:"captiveCoreVersion"`
ProtocolVersion uint32 `json:"protocolVersion"`
Version string `json:"version"`
CommitHash string `json:"commitHash"`
CommitHash2 string `json:"commit_hash"`

Check failure on line 19 in cmd/soroban-rpc/internal/methods/get_version_info.go

View workflow job for this annotation

GitHub Actions / golangci-lint

json(camel): got 'commit_hash' want 'commitHash' (tagliatelle)
BuildTimestamp string `json:"buildTimestamp"`
BuildTimestamp2 string `json:"build_timestamp"`

Check failure on line 21 in cmd/soroban-rpc/internal/methods/get_version_info.go

View workflow job for this annotation

GitHub Actions / golangci-lint

json(camel): got 'build_timestamp' want 'buildTimestamp' (tagliatelle)
CaptiveCoreVersion string `json:"captiveCoreVersion"`
CaptiveCoreVersion2 string `json:"captive_core_version"`

Check failure on line 23 in cmd/soroban-rpc/internal/methods/get_version_info.go

View workflow job for this annotation

GitHub Actions / golangci-lint

json(camel): got 'captive_core_version' want 'captiveCoreVersion' (tagliatelle)
ProtocolVersion uint32 `json:"protocolVersion"`
ProtocolVersion2 uint32 `json:"protocol_version"`

Check failure on line 25 in cmd/soroban-rpc/internal/methods/get_version_info.go

View workflow job for this annotation

GitHub Actions / golangci-lint

json(camel): got 'protocol_version' want 'protocolVersion' (tagliatelle)
}

func NewGetVersionInfoHandler(
Expand All @@ -37,11 +41,15 @@ func NewGetVersionInfoHandler(
}

return GetVersionInfoResponse{
Version: config.Version,
CommitHash: config.CommitHash,
BuildTimestamp: config.BuildTimestamp,
CaptiveCoreVersion: captiveCoreVersion,
ProtocolVersion: protocolVersion,
Version: config.Version,
CommitHash: config.CommitHash,
CommitHash2: config.CommitHash,
BuildTimestamp: config.BuildTimestamp,
BuildTimestamp2: config.BuildTimestamp,
CaptiveCoreVersion: captiveCoreVersion,
CaptiveCoreVersion2: captiveCoreVersion,
ProtocolVersion: protocolVersion,
ProtocolVersion2: protocolVersion,
}, nil
})
}

0 comments on commit 46f3cb3

Please sign in to comment.