diff --git a/node/node_syncing.go b/node/node_syncing.go index ad4f69eee..c9c479216 100644 --- a/node/node_syncing.go +++ b/node/node_syncing.go @@ -183,6 +183,9 @@ func (node *Node) CalculateResponse(request *downloader_pb.DownloaderRequest) (* var hash common.Hash hash.SetBytes(bytes) block := node.blockchain.GetBlockByHash(hash) + if block == nil { + continue + } encodedBlock, err := rlp.EncodeToBytes(block) if err == nil { response.Payload = append(response.Payload, encodedBlock)