File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1558,7 +1558,6 @@ func (e *Epoch) handleBlockMessage(message *BlockMessage, from NodeID) error {
15581558
15591559 // Create a task that will verify the block in the future, after its predecessors have also been verified.
15601560 task := e .createBlockVerificationTask (e .oneTimeVerifier .Wrap (block ), from , vote )
1561-
15621561 prevBlockDependency , emptyNotarizationDependency := e .blockDependencies (md )
15631562
15641563 // Schedule the block to be verified once its direct predecessor have been verified,
@@ -1579,6 +1578,11 @@ func (e *Epoch) handleBlockMessage(message *BlockMessage, from NodeID) error {
15791578// as well as a list of rounds for which it needs to verify empty notarizations.
15801579// TODO: we should request empty notarizations if we don't have them
15811580func (e * Epoch ) blockDependencies (bh BlockHeader ) (Digest , []uint64 ) {
1581+ if bh .Seq == 0 {
1582+ // genesis block has no dependencies
1583+ return emptyDigest , nil
1584+ }
1585+
15821586 prevBlockDependency := bh .Prev
15831587
15841588 prevBlock , notarizationOrFinalization , found := e .locateBlock (bh .Seq - 1 , bh .Prev [:])
You can’t perform that action at this time.
0 commit comments