Rename genesis block to genesis config (#6816)
This commit is contained in:
@ -620,31 +620,31 @@ impl RpcClient {
|
||||
))
|
||||
}
|
||||
|
||||
pub fn get_genesis_blockhash(&self) -> io::Result<Hash> {
|
||||
pub fn get_genesis_hash(&self) -> io::Result<Hash> {
|
||||
let response = self
|
||||
.client
|
||||
.send(&RpcRequest::GetGenesisBlockhash, None, 0, None)
|
||||
.send(&RpcRequest::GetGenesisHash, None, 0, None)
|
||||
.map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetGenesisBlockhash request failure: {:?}", err),
|
||||
format!("GetGenesisHash request failure: {:?}", err),
|
||||
)
|
||||
})?;
|
||||
|
||||
let blockhash = serde_json::from_value::<String>(response).map_err(|err| {
|
||||
let hash = serde_json::from_value::<String>(response).map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetGenesisBlockhash parse failure: {:?}", err),
|
||||
format!("GetGenesisHash parse failure: {:?}", err),
|
||||
)
|
||||
})?;
|
||||
|
||||
let blockhash = blockhash.parse().map_err(|err| {
|
||||
let hash = hash.parse().map_err(|err| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("GetGenesisBlockhash hash parse failure: {:?}", err),
|
||||
format!("GetGenesisHash hash parse failure: {:?}", err),
|
||||
)
|
||||
})?;
|
||||
Ok(blockhash)
|
||||
Ok(hash)
|
||||
}
|
||||
|
||||
pub fn poll_balance_with_timeout_and_commitment(
|
||||
|
@ -63,7 +63,7 @@ pub enum RpcRequest {
|
||||
GetClusterNodes,
|
||||
GetEpochInfo,
|
||||
GetEpochSchedule,
|
||||
GetGenesisBlockhash,
|
||||
GetGenesisHash,
|
||||
GetInflation,
|
||||
GetNumBlocksSinceSignatureConfirmation,
|
||||
GetProgramAccounts,
|
||||
@ -102,7 +102,7 @@ impl RpcRequest {
|
||||
RpcRequest::GetClusterNodes => "getClusterNodes",
|
||||
RpcRequest::GetEpochInfo => "getEpochInfo",
|
||||
RpcRequest::GetEpochSchedule => "getEpochSchedule",
|
||||
RpcRequest::GetGenesisBlockhash => "getGenesisBlockhash",
|
||||
RpcRequest::GetGenesisHash => "getGenesisHash",
|
||||
RpcRequest::GetInflation => "getInflation",
|
||||
RpcRequest::GetNumBlocksSinceSignatureConfirmation => {
|
||||
"getNumBlocksSinceSignatureConfirmation"
|
||||
|
Reference in New Issue
Block a user