mirror of
https://gitlab.com/pulsechaincom/lighthouse-pulse.git
synced 2024-12-27 22:37:25 +00:00
Remove some dust code from beacon chain
This commit is contained in:
parent
62b5f9c5a0
commit
2676c8a62d
@ -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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user