diff --git a/multiepoch-getVersion.go b/multiepoch-getVersion.go index ec81839d..9201c56e 100644 --- a/multiepoch-getVersion.go +++ b/multiepoch-getVersion.go @@ -46,3 +46,11 @@ func (ser *MultiEpoch) GetFaithfulVersionInfo() map[string]any { faithfulVersion["epochs"] = ser.GetEpochNumbers() return faithfulVersion } + +// 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 +} diff --git a/multiepoch.go b/multiepoch.go index 79628ae4..7408d098 100644 --- a/multiepoch.go +++ b/multiepoch.go @@ -298,13 +298,19 @@ func newMultiEpochHandler(handler *MultiEpoch, lsConf *ListenerConfig) func(ctx method := rpcRequest.Method if method == "getVersion" { + versionInfo := make(map[string]any) faithfulVersion := handler.GetFaithfulVersionInfo() + versionInfo["faithful"] = faithfulVersion + + solanaVersion := handler.GetSolanaVersionInfo() + for k, v := range solanaVersion { + versionInfo[k] = v + } + err := rqCtx.ReplyRaw( reqCtx, rpcRequest.ID, - map[string]any{ - "faithful": faithfulVersion, - }, + versionInfo, ) if err != nil { klog.Errorf("[%s] failed to reply to getVersion: %v", reqID, err)