From 8fb9e1f648b75b488f798a25cf2bce487ff8206e Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Tue, 13 Aug 2019 19:48:03 +1000 Subject: [PATCH] Remove duplicated attestation finalization check --- beacon_node/beacon_chain/src/beacon_chain.rs | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/beacon_node/beacon_chain/src/beacon_chain.rs b/beacon_node/beacon_chain/src/beacon_chain.rs index 61998b5de3..9ee51c1629 100644 --- a/beacon_node/beacon_chain/src/beacon_chain.rs +++ b/beacon_node/beacon_chain/src/beacon_chain.rs @@ -555,23 +555,6 @@ impl BeaconChain { .store .get::>(&attestation.data.beacon_block_root)? { - let finalized_epoch = self.head().beacon_state.finalized_checkpoint.epoch; - - if attestation_head_block.slot - <= finalized_epoch.start_slot(T::EthSpec::slots_per_epoch()) - { - // Ignore any attestation where the slot of `data.beacon_block_root` is equal to or - // prior to the finalized epoch. - // - // For any valid attestation if the `beacon_block_root` is prior to finalization, then - // all other parameters (source, target, etc) must all be prior to finalization and - // therefore no longer interesting. - return Ok(AttestationProcessingOutcome::FinalizedSlot { - attestation: attestation_head_block.epoch(), - finalized: finalized_epoch, - }); - } - // Attempt to process the attestation using the `self.head()` state. // // This is purely an effort to avoid loading a `BeaconState` unnecessarily from the DB.