getEpochInfo RPC endpoint now includes the current block height (#11155)
Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user