Skip to content

Commit

Permalink
Fix comparison comment in snowflake algorithms (#3256)
Browse files Browse the repository at this point in the history
  • Loading branch information
yacovm authored and tsachiherman committed Aug 5, 2024
1 parent e099d27 commit e46c2a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion snow/consensus/snowball/binary_snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func newBinarySnowflake(alphaPreference int, terminationConditions []termination
// Invariant:
// len(terminationConditions) == len(confidence)
// terminationConditions[i].alphaConfidence < terminationConditions[i+1].alphaConfidence
// terminationConditions[i].beta <= terminationConditions[i+1].beta
// terminationConditions[i].beta >= terminationConditions[i+1].beta
// confidence[i] >= confidence[i+1] (except after finalizing due to early termination)
type binarySnowflake struct {
// wrap the binary slush logic
Expand Down
2 changes: 1 addition & 1 deletion snow/consensus/snowball/nnary_snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func newNnarySnowflake(alphaPreference int, terminationConditions []terminationC
// Invariant:
// len(terminationConditions) == len(confidence)
// terminationConditions[i].alphaConfidence < terminationConditions[i+1].alphaConfidence
// terminationConditions[i].beta <= terminationConditions[i+1].beta
// terminationConditions[i].beta >= terminationConditions[i+1].beta
// confidence[i] >= confidence[i+1] (except after finalizing due to early termination)
type nnarySnowflake struct {
// wrap the n-nary slush logic
Expand Down
2 changes: 1 addition & 1 deletion snow/consensus/snowball/unary_snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func newUnarySnowflake(alphaPreference int, terminationConditions []terminationC
// Invariant:
// len(terminationConditions) == len(confidence)
// terminationConditions[i].alphaConfidence < terminationConditions[i+1].alphaConfidence
// terminationConditions[i].beta <= terminationConditions[i+1].beta
// terminationConditions[i].beta >= terminationConditions[i+1].beta
// confidence[i] >= confidence[i+1] (except after finalizing due to early termination)
type unarySnowflake struct {
// alphaPreference is the threshold required to update the preference
Expand Down

0 comments on commit e46c2a9

Please # to comment.