Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
531b3a96
Commit
531b3a96
authored
11 years ago
by
Jeffrey Wilcke
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5 from sdboyer/iotas
Idiomatic go: use iotas for const declarations
parents
3dae732f
357b4bc1
master
v1.10.12
v1.10.12-modified
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
messaging.go
ethwire/messaging.go
+3
-0
peer.go
peer.go
+6
-3
No files found.
ethwire/messaging.go
View file @
531b3a96
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
peer.go
View file @
531b3a96
...
...
@@ -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
...
...
@@ -56,9 +59,9 @@ func (d DiscReason) String() string {
type
Caps
byte
const
(
CapPeerDiscTy
=
0x01
CapTxTy
=
0x02
CapChainTy
=
0x04
CapPeerDiscTy
=
1
<<
iota
CapTxTy
CapChainTy
CapDefault
=
CapChainTy
|
CapTxTy
|
CapPeerDiscTy
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment