rpc: make `getGenesisHash` part of minimal api
This commit is contained in:
parent
f7118258d6
commit
4213ece7bd
|
@ -2403,6 +2403,9 @@ pub mod rpc_minimal {
|
|||
commitment: Option<CommitmentConfig>,
|
||||
) -> Result<EpochInfo>;
|
||||
|
||||
#[rpc(meta, name = "getGenesisHash")]
|
||||
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String>;
|
||||
|
||||
#[rpc(meta, name = "getHealth")]
|
||||
fn get_health(&self, meta: Self::Metadata) -> Result<String>;
|
||||
|
||||
|
@ -2481,6 +2484,11 @@ pub mod rpc_minimal {
|
|||
Ok(bank.get_epoch_info())
|
||||
}
|
||||
|
||||
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String> {
|
||||
debug!("get_genesis_hash rpc request received");
|
||||
Ok(meta.genesis_hash.to_string())
|
||||
}
|
||||
|
||||
fn get_health(&self, meta: Self::Metadata) -> Result<String> {
|
||||
match meta.health.check() {
|
||||
RpcHealthStatus::Ok => Ok("ok".to_string()),
|
||||
|
@ -3155,9 +3163,6 @@ pub mod rpc_full {
|
|||
limit: Option<usize>,
|
||||
) -> Result<Vec<RpcPerfSample>>;
|
||||
|
||||
#[rpc(meta, name = "getGenesisHash")]
|
||||
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String>;
|
||||
|
||||
#[rpc(meta, name = "getSignatureStatuses")]
|
||||
fn get_signature_statuses(
|
||||
&self,
|
||||
|
@ -3355,11 +3360,6 @@ pub mod rpc_full {
|
|||
.collect())
|
||||
}
|
||||
|
||||
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String> {
|
||||
debug!("get_genesis_hash rpc request received");
|
||||
Ok(meta.genesis_hash.to_string())
|
||||
}
|
||||
|
||||
fn get_signature_statuses(
|
||||
&self,
|
||||
meta: Self::Metadata,
|
||||
|
|
Loading…
Reference in New Issue