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