getEpochInfo RPC endpoint now includes the current block height (#11155)

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
mergify[bot]
2020-07-22 01:53:53 +00:00
committed by GitHub
parent 61d9d40e48
commit 24dc6680e1
3 changed files with 7 additions and 1 deletions

View File

@@ -2720,6 +2720,7 @@ impl Bank {
pub fn get_epoch_info(&self) -> EpochInfo {
let absolute_slot = self.slot();
let block_height = self.block_height();
let (epoch, slot_index) = self.get_epoch_and_slot_index(absolute_slot);
let slots_in_epoch = self.get_slots_in_epoch(epoch);
EpochInfo {
@@ -2727,6 +2728,7 @@ impl Bank {
slot_index,
slots_in_epoch,
absolute_slot,
block_height,
}
}