pub fn head_info(&self) -> Result<HeadInfo, Error> {
        self.with_head(|head| {
            let proposer_shuffling_decision_root = head
                .beacon_state
                .proposer_shuffling_decision_root(head.beacon_block_root)?;

            Ok(HeadInfo {
                slot: head.beacon_block.slot(),
                block_root: head.beacon_block_root,
                state_root: head.beacon_state_root(),
                current_justified_checkpoint: head.beacon_state.current_justified_checkpoint,
                finalized_checkpoint: head.beacon_state.finalized_checkpoint,
                fork: head.beacon_state.fork,
                genesis_time: head.beacon_state.genesis_time,
                genesis_validators_root: head.beacon_state.genesis_validators_root,
                proposer_shuffling_decision_root,
            })
        })
    }
/// Returns info representing the head block and state.
///
/// A summarized version of `Self::head` that involves less cloning.
Returns info representing the head block and state.
A summarized version of `Self::head` that involves less cloning.
Returns info representing the head block and state . A summarized version of ` Self :: head ` that involves less cloning .
pub fn head_info(&self) -> Result<HeadInfo, Error> {
        self.with_head(|head| {
            let proposer_shuffling_decision_root = head
                .beacon_state
                .proposer_shuffling_decision_root(head.beacon_block_root)?;
            Ok(HeadInfo {
                slot: head.beacon_block.slot(),
                block_root: head.beacon_block_root,
                state_root: head.beacon_state_root(),
                current_justified_checkpoint: head.beacon_state.current_justified_checkpoint,
                finalized_checkpoint: head.beacon_state.finalized_checkpoint,
                fork: head.beacon_state.fork,
                genesis_time: head.beacon_state.genesis_time,
                genesis_validators_root: head.beacon_state.genesis_validators_root,
                proposer_shuffling_decision_root,
            })
        })
    }
pub fn head_info ( & self ) -> Result < HeadInfo , Error > { self . with_head ( | head | { let proposer_shuffling_decision_root = head . beacon_state . proposer_shuffling_decision_root ( head . beacon_block_root ) ? ; Ok ( HeadInfo { slot : head . beacon_block . slot ( ) , block_root : head . beacon_block_root , state_root : head . beacon_state_root ( ) , current_justified_checkpoint : head . beacon_state . current_justified_checkpoint , finalized_checkpoint : head . beacon_state . finalized_checkpoint , fork : head . beacon_state . fork , genesis_time : head . beacon_state . genesis_time , genesis_validators_root : head . beacon_state . genesis_validators_root , proposer_shuffling_decision_root , } ) } ) }
Returns info representing the head block and state.
Returns info representing the head block and state .
&self