diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-25 20:55:46 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-03-25 20:55:46 +0800 |
commit | aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c (patch) | |
tree | 836fbfcb33ee385a19f0e5e529262efb0a905995 /whisper | |
parent | 7f0c2545a91fd2dce0fea8078222a80dccd8b42b (diff) | |
parent | 2b93843d86532db3d6b530daf15c04fde0b73eba (diff) | |
download | dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar.gz dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar.bz2 dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar.lz dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar.xz dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.tar.zst dexon-aa1eae67ecd8a85a043f49e36e33bd3c44a1d94c.zip |
Merge pull request #560 from tgerring/xethcleanup
XEth cleanup
Diffstat (limited to 'whisper')
-rw-r--r-- | whisper/whisper.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/whisper/whisper.go b/whisper/whisper.go index dbd4fc85f..1d019aea5 100644 --- a/whisper/whisper.go +++ b/whisper/whisper.go @@ -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() |