From 65ce94b2efc5acd97acfb742dd72380626fa210e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 7 Aug 2019 16:54:35 +1000 Subject: [PATCH] Remove old code fragment --- beacon_node/beacon_chain/src/beacon_chain.rs | 42 -------------------- 1 file changed, 42 deletions(-) diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 5fc59ba66..60b65c95b 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -648,48 +648,6 @@ impl BeaconChain { .map_err(|e| Error::AttestationValidationError(e)) } - /* - /// Retrieves the `BeaconState` used to create the attestation. - fn get_attestation_state( - &self, - attestation: &Attestation, - ) -> Option> { - let state = &self.head().beacon_state; - - // Current state is used if the attestation targets a historic block and a slot within an - // equal or adjacent epoch. - let slots_per_epoch = T::EthSpec::slots_per_epoch(); - let min_slot = - (self.state.read().slot.epoch(slots_per_epoch) - 1).start_slot(slots_per_epoch); - let blocks = BestBlockRootsIterator::owned( - self.store.clone(), - self.state.read().clone(), - self.state.read().slot.clone(), - ); - for (root, slot) in blocks { - if root == attestation.data.target.root { - return Some(self.state.read().clone()); - } - - if slot == min_slot { - break; - } - } - - // A different state is retrieved from the database. - match self - .store - .get::>(&attestation.data.target.root) - { - Ok(Some(block)) => match self.store.get::>(&block.state_root) { - Ok(state) => state, - _ => None, - }, - _ => None, - } - } - */ - /// Accept some deposit and queue it for inclusion in an appropriate block. pub fn process_deposit( &self,