Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Add comment explaining why iota is not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
sdboyer committed Feb 18, 2014
1 parent 5adbd39 commit 357b4bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ethwire/messaging.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ var MagicToken = []byte{34, 64, 8, 145}
type MsgType byte

const (
// Values are given explicitly instead of by iota because these values are
// defined by the wire protocol spec; it is easier for humans to ensure
// correctness when values are explicit.
MsgHandshakeTy = 0x00
MsgDiscTy = 0x01
MsgPingTy = 0x02
Expand Down
3 changes: 3 additions & 0 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ const (
type DiscReason byte

const (
// Values are given explicitly instead of by iota because these values are
// defined by the wire protocol spec; it is easier for humans to ensure
// correctness when values are explicit.
DiscReRequested = 0x00
DiscReTcpSysErr = 0x01
DiscBadProto = 0x02
Expand Down

0 comments on commit 357b4bc

Please sign in to comment.