mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-11 13:49:02 +00:00
Add comment explaining why iota is not used.
This commit is contained in:
parent
5adbd39946
commit
357b4bc14c
2 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
3
peer.go
3
peer.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue