get version

This commit is contained in:
aniketfuryrocks 2022-12-10 14:31:39 +05:30
parent 2e1e99b117
commit 86c84df6db
No known key found for this signature in database
GPG Key ID: 9CDC12D03F4F5BB7
1 changed files with 12 additions and 0 deletions

View File

@ -328,7 +328,11 @@ pub mod lite_rpc {
signature_strs: Vec<String>,
config: Option<RpcSignatureStatusConfig>,
) -> Result<RpcResponse<Vec<Option<TransactionStatus>>>>;
#[rpc(name = "getVersion")]
fn get_version(&self) -> Result<RpcVersionInfo>;
}
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<RpcVersionInfo> {
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,