From 86c84df6dbdd60f7127f40a197761d67aabd9ad4 Mon Sep 17 00:00:00 2001 From: aniketfuryrocks Date: Sat, 10 Dec 2022 14:31:39 +0530 Subject: [PATCH] get version --- src/rpc.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/rpc.rs b/src/rpc.rs index 294ad1c4..8fed9bad 100644 --- a/src/rpc.rs +++ b/src/rpc.rs @@ -328,7 +328,11 @@ pub mod lite_rpc { signature_strs: Vec, config: Option, ) -> Result>>>; + + #[rpc(name = "getVersion")] + fn get_version(&self) -> Result; } + pub struct LightRpc; impl Lite for LightRpc { type Metadata = LightRpcRequestProcessor; @@ -562,6 +566,14 @@ pub mod lite_rpc { Ok(signature.unwrap().to_string()) } + fn get_version(&self) -> Result { + let version = solana_version::Version::default(); + Ok(RpcVersionInfo { + solana_core: version.to_string(), + feature_set: Some(version.feature_set), + }) + } + fn get_performance_counters( &self, meta: Self::Metadata,