diff --git a/beacon_chain/consensus_object_pools/blockchain_dag.nim b/beacon_chain/consensus_object_pools/blockchain_dag.nim index 56e49e81a..d6d34db71 100644 --- a/beacon_chain/consensus_object_pools/blockchain_dag.nim +++ b/beacon_chain/consensus_object_pools/blockchain_dag.nim @@ -1125,10 +1125,6 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB, head = shortLog(head), tail = shortLog(dag.tail) quit 1 - withState(dag.headState): - when consensusFork >= ConsensusFork.Altair: - dag.headSyncCommittees = forkyState.data.get_sync_committee_cache(cache) - block: # EpochRef needs an epoch boundary state assign(dag.epochRefState, dag.headState) @@ -1143,6 +1139,10 @@ proc init*(T: type ChainDAGRef, cfg: RuntimeConfig, db: BeaconChainDB, dag.head = headRef dag.heads = @[headRef] + withState(dag.headState): + when consensusFork >= ConsensusFork.Altair: + dag.headSyncCommittees = forkyState.data.get_sync_committee_cache(cache) + assign(dag.clearanceState, dag.headState) if dag.headState.latest_block_root == tail.root: