good morning!!!!

Skip to content
Snippets Groups Projects
Commit c956bcb1 authored by Taylor Gerring's avatar Taylor Gerring
Browse files

Move version to const and expose via Version()

parent d41341f7
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment