Add getBlockProduction RPC method

This commit is contained in:
Michael Vines
2021-04-28 09:57:05 -07:00
parent cfc1cb1aee
commit 542d88929f
6 changed files with 289 additions and 29 deletions

View File

@@ -444,6 +444,18 @@ impl RpcClient {
})
}
/// Get block production for the current epoch
pub fn get_block_production(&self) -> RpcResult<RpcBlockProduction> {
self.send(RpcRequest::GetBlockProduction, Value::Null)
}
pub fn get_block_production_with_config(
&self,
config: RpcBlockProductionConfig,
) -> RpcResult<RpcBlockProduction> {
self.send(RpcRequest::GetBlockProduction, json!(config))
}
pub fn get_stake_activation(
&self,
stake_account: Pubkey,