-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implementation of #38 on the multiepoch time.
- Loading branch information
1 parent
0f60ba9
commit 658be27
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
|
||
"github.com/sourcegraph/jsonrpc2" | ||
) | ||
|
||
// @TODO make these values make sense | ||
func (ser *MultiEpoch) handleGetVersion(ctx context.Context, conn *requestContext, req *jsonrpc2.Request) (*jsonrpc2.Error, error) { | ||
// taken from solana mainnet version reponse | ||
var versionResponse GetVersionResponse | ||
versionResponse.FeatureSet = 1879391783 | ||
versionResponse.SolanaCore = "1.14.23" | ||
var err = conn.Reply( | ||
ctx, | ||
req.ID, | ||
versionResponse, | ||
func(m map[string]any) map[string]any { | ||
r := map[string]any{} | ||
r["feature-set"] = m["featureSet"] | ||
r["solana-core"] = m["solanaCore"] | ||
return r | ||
}, | ||
) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to reply: %w", err) | ||
} | ||
return nil, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters