mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Next sync committee branch bug (#7443)
#7441 Make sure we're correctly caching light client data
This commit is contained in:
@@ -421,18 +421,13 @@ struct LightClientCachedData<E: EthSpec> {
|
||||
|
||||
impl<E: EthSpec> LightClientCachedData<E> {
|
||||
fn from_state(state: &mut BeaconState<E>) -> Result<Self, BeaconChainError> {
|
||||
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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user