mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-29 19:04:27 +00:00
Remove some dust code from beacon chain
This commit is contained in:
@@ -644,7 +644,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
// Attempt to process the attestation using the `self.head()` state.
|
// Attempt to process the attestation using the `self.head()` state.
|
||||||
//
|
//
|
||||||
// This is purely an effort to avoid loading a `BeaconState` unnecessarily from the DB.
|
// 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;
|
let state = &self.head().beacon_state;
|
||||||
|
|
||||||
// If it turns out that the attestation was made using the head state, then there
|
// 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
|
// Use the `data.beacon_block_root` to load the state from the latest non-skipped
|
||||||
// slot preceding the attestation's creation.
|
// slot preceding the attestation's creation.
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user