mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Migrate codebase across to new SlotClock API
This commit is contained in:
@@ -88,8 +88,8 @@ pub fn state_root_at_slot<T: BeaconChainTypes>(
|
||||
) -> Result<Hash256, ApiError> {
|
||||
let head_state = &beacon_chain.head().beacon_state;
|
||||
let current_slot = beacon_chain
|
||||
.read_slot_clock()
|
||||
.ok_or_else(|| ApiError::ServerError("Unable to read slot clock".to_string()))?;
|
||||
.present_slot()
|
||||
.map_err(|_| ApiError::ServerError("Unable to read slot clock".to_string()))?;
|
||||
|
||||
// There are four scenarios when obtaining a state for a given slot:
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user