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>,
|
commitment: Option<CommitmentConfig>,
|
||||||
) -> Result<EpochInfo>;
|
) -> Result<EpochInfo>;
|
||||||
|
|
||||||
|
#[rpc(meta, name = "getGenesisHash")]
|
||||||
|
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String>;
|
||||||
|
|
||||||
#[rpc(meta, name = "getHealth")]
|
#[rpc(meta, name = "getHealth")]
|
||||||
fn get_health(&self, meta: Self::Metadata) -> Result<String>;
|
fn get_health(&self, meta: Self::Metadata) -> Result<String>;
|
||||||
|
|
||||||
|
@ -2481,6 +2484,11 @@ pub mod rpc_minimal {
|
||||||
Ok(bank.get_epoch_info())
|
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> {
|
fn get_health(&self, meta: Self::Metadata) -> Result<String> {
|
||||||
match meta.health.check() {
|
match meta.health.check() {
|
||||||
RpcHealthStatus::Ok => Ok("ok".to_string()),
|
RpcHealthStatus::Ok => Ok("ok".to_string()),
|
||||||
|
@ -3155,9 +3163,6 @@ pub mod rpc_full {
|
||||||
limit: Option<usize>,
|
limit: Option<usize>,
|
||||||
) -> Result<Vec<RpcPerfSample>>;
|
) -> Result<Vec<RpcPerfSample>>;
|
||||||
|
|
||||||
#[rpc(meta, name = "getGenesisHash")]
|
|
||||||
fn get_genesis_hash(&self, meta: Self::Metadata) -> Result<String>;
|
|
||||||
|
|
||||||
#[rpc(meta, name = "getSignatureStatuses")]
|
#[rpc(meta, name = "getSignatureStatuses")]
|
||||||
fn get_signature_statuses(
|
fn get_signature_statuses(
|
||||||
&self,
|
&self,
|
||||||
|
@ -3355,11 +3360,6 @@ pub mod rpc_full {
|
||||||
.collect())
|
.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(
|
fn get_signature_statuses(
|
||||||
&self,
|
&self,
|
||||||
meta: Self::Metadata,
|
meta: Self::Metadata,
|
||||||
|
|
Loading…
Reference in New Issue