diff --git a/beacon_node/beacon_chain/src/light_client_server_cache.rs b/beacon_node/beacon_chain/src/light_client_server_cache.rs index 8e29be9732..b7b6d1df18 100644 --- a/beacon_node/beacon_chain/src/light_client_server_cache.rs +++ b/beacon_node/beacon_chain/src/light_client_server_cache.rs @@ -421,18 +421,13 @@ struct LightClientCachedData { impl LightClientCachedData { fn from_state(state: &mut BeaconState) -> Result { - let (finality_branch, next_sync_committee_branch, current_sync_committee_branch) = ( - state.compute_finalized_root_proof()?, - state.compute_current_sync_committee_proof()?, - state.compute_next_sync_committee_proof()?, - ); Ok(Self { finalized_checkpoint: state.finalized_checkpoint(), - finality_branch, + finality_branch: state.compute_finalized_root_proof()?, next_sync_committee: state.next_sync_committee()?.clone(), current_sync_committee: state.current_sync_committee()?.clone(), - next_sync_committee_branch, - current_sync_committee_branch, + next_sync_committee_branch: state.compute_next_sync_committee_proof()?, + current_sync_committee_branch: state.compute_current_sync_committee_proof()?, finalized_block_root: state.finalized_checkpoint().root, }) }