@@ -1419,35 +1419,35 @@ func setupClusterGenesisBlockQCs(nClusters uint, epochCounter uint64, confs []Co
14191419 participants := participantsUnsorted .Sort (flow .Canonical [flow .Identity ])
14201420 collectors := participants .Filter (filter.HasRole [flow.Identity ](flow .RoleCollection )).ToSkeleton ()
14211421 assignments := unittest .ClusterAssignment (nClusters , collectors )
1422- clusters , err := factory .NewClusterList (assignments , collectors )
1422+ _ , err := factory .NewClusterList (assignments , collectors )
14231423 if err != nil {
14241424 return nil , nil , nil , fmt .Errorf ("could not create cluster list: %w" , err )
14251425 }
14261426
14271427 rootBlocks := make ([]* cluster.Block , 0 , nClusters )
14281428 qcs := make ([]* flow.QuorumCertificate , 0 , nClusters )
14291429
1430- for _ , cluster := range clusters {
1430+ for _ , assignment := range assignments {
14311431 // generate root cluster block
1432- block , err := clusterstate .CanonicalRootBlock (epochCounter , cluster )
1432+ block , err := clusterstate .CanonicalRootBlock (epochCounter , assignment )
14331433 if err != nil {
14341434 return nil , nil , nil , fmt .Errorf ("failed to generate canonical root block: %w" , err )
14351435 }
14361436
14371437 lookup := make (map [flow.Identifier ]struct {})
1438- for _ , node := range cluster {
1439- lookup [node . NodeID ] = struct {}{}
1438+ for _ , nodeID := range assignment {
1439+ lookup [nodeID ] = struct {}{}
14401440 }
14411441
14421442 // gather cluster participants
1443- clusterNodeInfos := make ([]bootstrap.NodeInfo , 0 , len (cluster ))
1443+ clusterNodeInfos := make ([]bootstrap.NodeInfo , 0 , len (assignment ))
14441444 for _ , conf := range confs {
14451445 _ , exists := lookup [conf .NodeID ]
14461446 if exists {
14471447 clusterNodeInfos = append (clusterNodeInfos , conf .NodeInfo )
14481448 }
14491449 }
1450- if len (cluster ) != len (clusterNodeInfos ) { // sanity check
1450+ if len (assignment ) != len (clusterNodeInfos ) { // sanity check
14511451 return nil , nil , nil , fmt .Errorf ("requiring a node info for each cluster participant" )
14521452 }
14531453
0 commit comments