@ -172,7 +172,9 @@ impl JsonRpcRequestProcessor {
|
||||
pub fn get_epoch_schedule(&self) -> Result<EpochSchedule> {
|
||||
// Since epoch schedule data comes from the genesis config, any commitment level should be
|
||||
// fine
|
||||
Ok(*self.bank(None)?.epoch_schedule())
|
||||
Ok(*self
|
||||
.bank(Some(CommitmentConfig::recent()))?
|
||||
.epoch_schedule())
|
||||
}
|
||||
|
||||
pub fn get_balance(
|
||||
@ -903,22 +905,15 @@ impl RpcSol for RpcSolImpl {
|
||||
commitment: Option<CommitmentConfig>,
|
||||
) -> Result<Inflation> {
|
||||
debug!("get_inflation rpc request received");
|
||||
Ok(meta
|
||||
.request_processor
|
||||
meta.request_processor
|
||||
.read()
|
||||
.unwrap()
|
||||
.get_inflation(commitment)
|
||||
.unwrap())
|
||||
}
|
||||
|
||||
fn get_epoch_schedule(&self, meta: Self::Metadata) -> Result<EpochSchedule> {
|
||||
debug!("get_epoch_schedule rpc request received");
|
||||
Ok(meta
|
||||
.request_processor
|
||||
.read()
|
||||
.unwrap()
|
||||
.get_epoch_schedule()
|
||||
.unwrap())
|
||||
meta.request_processor.read().unwrap().get_epoch_schedule()
|
||||
}
|
||||
|
||||
fn get_balance(
|
||||
|
Reference in New Issue
Block a user