Skip to content

Commit

Permalink
Fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Kourin1996 committed Jan 30, 2023
1 parent c2fee48 commit 63f4cc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consensus/ibft/signer/extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ type Seals interface {
}

// parseRound parses RLP-encoded bytes into round
// FYI, Extra has 8 bytes space for round in order to distinguish between null and 0
func parseRound(v *fastrlp.Value) (*uint64, error) {
roundBytes, err := v.Bytes()
if err != nil {
Expand All @@ -64,6 +63,8 @@ func parseRound(v *fastrlp.Value) (*uint64, error) {
}

// toRoundBytes converts uint64 round to bytes
// Round begins with zero and it can be nil for backward compatibility.
// For that reason, Extra always has 8 bytes space for a round when the round has value.
func toRoundBytes(round uint64) []byte {
roundBytes := make([]byte, 8)
binary.BigEndian.PutUint64(roundBytes, round)
Expand Down

0 comments on commit 63f4cc0

Please sign in to comment.