From 83a8e82626f54a69cafcff92a67b353c769fa588 Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 18 Feb 2020 10:02:29 -0700 Subject: [PATCH] Remove dead code --- core/src/cluster_info.rs | 13 ------------- ledger/src/snapshot_package.rs | 13 ++++++++----- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/core/src/cluster_info.rs b/core/src/cluster_info.rs index 5e6024794..e04dc6500 100644 --- a/core/src/cluster_info.rs +++ b/core/src/cluster_info.rs @@ -440,19 +440,6 @@ impl ClusterInfo { .map(|x| (x.value.epoch_slots().unwrap(), x.insert_timestamp)) } - pub fn get_gossiped_root_for_node(&self, pubkey: &Pubkey, since: Option) -> Option { - self.gossip - .crds - .table - .get(&CrdsValueLabel::EpochSlots(*pubkey)) - .filter(|x| { - since - .map(|since| x.insert_timestamp > since) - .unwrap_or(true) - }) - .map(|x| x.value.epoch_slots().unwrap().root) - } - pub fn get_contact_info_for_node(&self, pubkey: &Pubkey) -> Option<&ContactInfo> { self.gossip .crds diff --git a/ledger/src/snapshot_package.rs b/ledger/src/snapshot_package.rs index 26064f435..76c4f1e5e 100644 --- a/ledger/src/snapshot_package.rs +++ b/ledger/src/snapshot_package.rs @@ -1,9 +1,12 @@ -use solana_runtime::accounts_db::AccountStorageEntry; -use solana_runtime::bank::BankSlotDelta; +use solana_runtime::{accounts_db::AccountStorageEntry, bank::BankSlotDelta}; use solana_sdk::clock::Slot; -use std::path::PathBuf; -use std::sync::mpsc::{Receiver, SendError, Sender}; -use std::sync::Arc; +use std::{ + path::PathBuf, + sync::{ + mpsc::{Receiver, SendError, Sender}, + Arc, + }, +}; use tempfile::TempDir; pub type SnapshotPackageSender = Sender;