Upgrade codebase to new SlotClock API

This commit is contained in:
Paul Hauner
2019-08-29 14:26:30 +10:00
parent 4557d2c84b
commit 7d03806107
11 changed files with 43 additions and 54 deletions

View File

@@ -88,7 +88,7 @@ pub fn state_root_at_slot<T: BeaconChainTypes>(
) -> Result<Hash256, ApiError> {
let head_state = &beacon_chain.head().beacon_state;
let current_slot = beacon_chain
.present_slot()
.slot()
.map_err(|_| ApiError::ServerError("Unable to read slot clock".to_string()))?;
// There are four scenarios when obtaining a state for a given slot: