File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
execution_chain/sync/beacon/worker/blocks Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,13 @@ proc importBlock*(
3737 B= ctx.chain.baseNumber.bnStr, L= ctx.chain.latestNumber.bnStr
3838 else :
3939 try :
40- (await ctx.chain.queueImportBlock blk).isOkOr:
41- return err ((ENoException ," " ,error,Moment .now ()- start))
40+ # At this point the header chain has already been verifed and so we know
41+ # the block is finalized as long as the block number is less than or equal
42+ # to the latest finalized block. Setting the finalized flag to true here
43+ # has the effect of skipping the stateroot check for performance reasons.
44+ let isFinalized = blk.header.number <= ctx.chain.latestFinalizedBlockNumber
45+ (await ctx.chain.queueImportBlock (blk, isFinalized)).isOkOr:
46+ return err ((ENoException , " " , error, Moment .now () - start))
4247 except CancelledError as e:
4348 return err ((ECancelledError ,$ e.name,e.msg,Moment .now ()- start))
4449
@@ -61,4 +66,3 @@ proc importBlock*(
6166# ------------------------------------------------------------------------------
6267# End
6368# ------------------------------------------------------------------------------
64-
You can’t perform that action at this time.
0 commit comments