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
c956bcb1
Commit
c956bcb1
authored
Mar 25, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move version to const and expose via Version()
parent
d41341f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
whisper.go
whisper/whisper.go
+8
-3
No files found.
whisper/whisper.go
View file @
c956bcb1
...
...
@@ -16,8 +16,9 @@ import (
)
const
(
statusMsg
=
0x0
envelopesMsg
=
0x01
statusMsg
=
0x0
envelopesMsg
=
0x01
whisperVersion
=
0x02
)
type
MessageEvent
struct
{
...
...
@@ -56,7 +57,7 @@ func New() *Whisper {
// p2p whisper sub protocol handler
whisper
.
protocol
=
p2p
.
Protocol
{
Name
:
"shh"
,
Version
:
2
,
Version
:
uint
(
whisperVersion
)
,
Length
:
2
,
Run
:
whisper
.
msgHandler
,
}
...
...
@@ -64,6 +65,10 @@ func New() *Whisper {
return
whisper
}
func
(
self
*
Whisper
)
Version
()
uint
{
return
self
.
protocol
.
Version
}
func
(
self
*
Whisper
)
Start
()
{
wlogger
.
Infoln
(
"Whisper started"
)
go
self
.
update
()
...
...
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