diff --git a/program-runtime/src/loaded_programs.rs b/program-runtime/src/loaded_programs.rs index 89f0ef0d5304a0..db5bb8224bff4f 100644 --- a/program-runtime/src/loaded_programs.rs +++ b/program-runtime/src/loaded_programs.rs @@ -55,11 +55,6 @@ pub enum BlockRelation { pub trait ForkGraph { /// Returns the BlockRelation of A to B fn relationship(&self, a: Slot, b: Slot) -> BlockRelation; - - /// Returns the epoch of the given slot - fn slot_epoch(&self, _slot: Slot) -> Option { - Some(0) - } } /// The owner of a programs accounts, thus the loader of a program diff --git a/runtime/src/bank_forks.rs b/runtime/src/bank_forks.rs index 884fdddcfa616e..aa3d78ea128ecd 100644 --- a/runtime/src/bank_forks.rs +++ b/runtime/src/bank_forks.rs @@ -13,10 +13,7 @@ use { log::*, solana_measure::measure::Measure, solana_program_runtime::loaded_programs::{BlockRelation, ForkGraph}, - solana_sdk::{ - clock::{Epoch, Slot}, - hash::Hash, - }, + solana_sdk::{clock::Slot, hash::Hash}, std::{ collections::{hash_map::Entry, HashMap, HashSet}, ops::Index, @@ -721,10 +718,6 @@ impl ForkGraph for BankForks { }) .unwrap_or(BlockRelation::Unknown) } - - fn slot_epoch(&self, slot: Slot) -> Option { - self.banks.get(&slot).map(|bank| bank.epoch()) - } } #[cfg(test)] diff --git a/svm/tests/mock_bank.rs b/svm/tests/mock_bank.rs index 169ac63cf8854b..99e9b9162067f2 100644 --- a/svm/tests/mock_bank.rs +++ b/svm/tests/mock_bank.rs @@ -17,7 +17,7 @@ use { solana_sdk::{ account::{AccountSharedData, ReadableAccount, WritableAccount}, bpf_loader_upgradeable::{self, UpgradeableLoaderState}, - clock::{Clock, Epoch, UnixTimestamp}, + clock::{Clock, UnixTimestamp}, feature_set::FeatureSet, native_loader, pubkey::Pubkey, @@ -49,10 +49,6 @@ impl ForkGraph for MockForkGraph { Ordering::Greater => BlockRelation::Descendant, } } - - fn slot_epoch(&self, _slot: Slot) -> Option { - Some(0) - } } #[derive(Default, Clone)]