Skip to content

Commit

Permalink
Extend with solana info
Browse files Browse the repository at this point in the history
  • Loading branch information
linuskendall committed Aug 20, 2023
1 parent ca85e19 commit 61d2157
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions multiepoch-getVersion.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ func (ser *MultiEpoch) tryEnrichGetVersion(body []byte) ([]byte, error) {
faithfulVersion := ser.GetFaithfulVersionInfo()
decodedResult["faithful"] = faithfulVersion

solanaVersion := ser.GetSolanaVersionInfo()
for k,v := range solanaVersion {
decodedResult[k] = v
}

// re-encode the result:
encodedResult, err := json.Marshal(decodedResult)
if err != nil {
Expand All @@ -39,6 +44,14 @@ func (ser *MultiEpoch) tryEnrichGetVersion(body []byte) ([]byte, error) {
return encodedResponse, nil
}

// This function should return the solana version we are compatible with
func (ser *MultiEpoch) GetSolanaVersionInfo() map[string]any {
solanaVersion := make(map[string]any)
solanaVersion["feature-set"] = 1879391783
solanaVersion["solana-core"] = "1.16.7"
return solanaVersion
}

func (ser *MultiEpoch) GetFaithfulVersionInfo() map[string]any {
faithfulVersion := make(map[string]any)
faithfulVersion["version"] = GitTag
Expand Down

0 comments on commit 61d2157

Please sign in to comment.