Remove some dust code from beacon chain

This commit is contained in:
Paul Hauner 2019-09-13 18:33:17 -04:00
parent 62b5f9c5a0
commit 2676c8a62d
No known key found for this signature in database
GPG Key ID: 303E4494BB28068C

View File

@ -644,7 +644,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
// Attempt to process the attestation using the `self.head()` state.
//
// This is purely an effort to avoid loading a `BeaconState` unnecessarily from the DB.
// Take a read lock on the head beacon state.
let state = &self.head().beacon_state;
// If it turns out that the attestation was made using the head state, then there
@ -674,12 +673,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
);
}
// Ensure the read-lock from `self.head()` is dropped.
//
// This is likely unnecessary, however it remains as a reminder to ensure this lock
// isn't hogged.
std::mem::drop(state);
// Use the `data.beacon_block_root` to load the state from the latest non-skipped
// slot preceding the attestation's creation.
//