Merge branch 'dev/etan/af-cacheinit' into feat/splitview
This commit is contained in:
commit
3c7ac28359
|
@ -1136,10 +1136,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)
|
||||
|
@ -1154,6 +1150,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:
|
||||
|
|
Loading…
Reference in New Issue