diff options
author | obscuren <geffobscura@gmail.com> | 2014-03-03 18:35:35 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-03-03 18:35:35 +0800 |
commit | 5b1613d65b0c3471b80990120022b5a745ecab86 (patch) | |
tree | addbb87cc82cca07e8ac8aa810d810e1de02b2a5 /peer.go | |
parent | d7c5936ac4ee8ae3156e0bc9813db61b990aa686 (diff) | |
parent | c1d0ea7366f1bad134c985dbe1f272d376e5ec9b (diff) | |
download | dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar.gz dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar.bz2 dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar.lz dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar.xz dexon-5b1613d65b0c3471b80990120022b5a745ecab86.tar.zst dexon-5b1613d65b0c3471b80990120022b5a745ecab86.zip |
Merge branch 'master' into develop
Diffstat (limited to 'peer.go')
-rw-r--r-- | peer.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -17,6 +17,8 @@ import ( const ( // The size of the output buffer for writing messages outputBufferSize = 50 + // Current protocol version + ProtocolVersion = 7 ) type DiscReason byte @@ -469,7 +471,7 @@ func (p *Peer) pushHandshake() error { pubkey := ethutil.NewValueFromBytes(data).Get(2).Bytes() msg := ethwire.NewMessage(ethwire.MsgHandshakeTy, []interface{}{ - uint32(5), uint32(0), p.Version, byte(p.caps), p.port, pubkey, + uint32(ProtocolVersion), uint32(0), p.Version, byte(p.caps), p.port, pubkey, }) p.QueueMessage(msg) @@ -496,7 +498,7 @@ func (p *Peer) pushPeers() { func (p *Peer) handleHandshake(msg *ethwire.Msg) { c := msg.Data - if c.Get(0).Uint() != 5 { + if c.Get(0).Uint() != ProtocolVersion { ethutil.Config.Log.Debugln("Invalid peer version. Require protocol v5") p.Stop() return |