Add first-available-block command

This commit is contained in:
Michael Vines
2020-09-06 10:54:01 -07:00
parent b529fc7fb9
commit 6677996369
4 changed files with 21 additions and 0 deletions

View File

@@ -709,6 +709,10 @@ impl RpcClient {
.into())
}
pub fn get_first_available_block(&self) -> ClientResult<Slot> {
self.send(RpcRequest::GetFirstAvailableBlock, Value::Null)
}
pub fn get_genesis_hash(&self) -> ClientResult<Hash> {
let hash_str: String = self.send(RpcRequest::GetGenesisHash, Value::Null)?;
let hash = hash_str.parse().map_err(|_| {