Skip to content

Commit

Permalink
Merge pull request #1512 from dusk-network/1509-fix-createsortitionha…
Browse files Browse the repository at this point in the history
…sh-description

Fix createSortitionHash description

Resolves #1509
  • Loading branch information
fed-franz authored Apr 5, 2023
2 parents 1860a85 + a888566 commit d9cc966
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/core/consensus/user/sortition.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ func (v VotingCommittee) MarshalJSON() ([]byte, error) {
return json.Marshal(data)
}

// createSortitionHash takes Seed value 'seed', round number 'round', step number 'step', and iteration number 'i',
// and returns the SHA3-256 hash of their concatenation (i.e., H(round||i||step||seed)).
// createSortitionHash takes the Seed value 'seed', the round number 'round', the step number 'step',
// the index 'i' of the committee member to extract,
// and returns the hash (SHA3-256) of their concatenation (i.e., H(round||i||step||seed)).
func createSortitionHash(seed []byte, round uint64, step uint8, i int) ([]byte, error) {
msg := make([]byte, 12)

Expand Down

0 comments on commit d9cc966

Please sign in to comment.