Skip to content

Commit 6bd15d1

Browse files
Apply suggestions from code review
Co-authored-by: Jordan Schalm <[email protected]>
1 parent d64d717 commit 6bd15d1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cmd/bootstrap/cmd/rootblock.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ func validateEpochConfig() error {
383383
return nil
384384
}
385385

386-
// readIntermediaryBootstrappingData reads intermediary clustering data file from disk.
386+
// readIntermediaryClusteringData reads intermediary clustering data file from disk.
387387
// This file needs to be prepared with the clustering bootstrap command
388388
func readIntermediaryClusteringData() *IntermediaryClusteringData {
389389
intermediaryData, err := utils.ReadData[IntermediaryClusteringData](flagIntermediaryClusteringDataPath)
@@ -395,6 +395,7 @@ func readIntermediaryClusteringData() *IntermediaryClusteringData {
395395

396396
// readClusterBlockVotes reads votes for root cluster blocks.
397397
// It sorts the votes into the appropriate clusters according to the given assignment list.
398+
// The returned list of votes is in cluster index order (first list of votes is for cluster 0, etc.)
398399
func readClusterBlockVotes(al flow.AssignmentList) [][]*hotstuff.Vote {
399400
votes := make([][]*hotstuff.Vote, len(al))
400401
files, err := common.FilesInDir(flagRootClusterBlockVotesDir)
@@ -424,7 +425,7 @@ func readClusterBlockVotes(al flow.AssignmentList) [][]*hotstuff.Vote {
424425
}
425426
}
426427
if !found {
427-
log.Warn().Msgf("ignoring vote for block %v from signerID %v not part of the assignment", vote.BlockID, vote.SignerID)
428+
log.Fatal().Msgf("Halting because found vote for block %v from signerID %v not part of the assignment", vote.BlockID, vote.SignerID)
428429
}
429430
}
430431
return votes

cmd/bootstrap/transit/cmd/pull_clustering.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
var pullClusteringCmd = &cobra.Command{
1515
Use: "pull-clustering",
16-
Short: "Pull epoch clustering",
16+
Short: "Pull clustering assignment for the first epoch of this spork. This is used to generate a root cluster block vote for this node's assigned cluster.",
1717
Run: pullClustering,
1818
}
1919

0 commit comments

Comments
 (0)