From c1d0ea7366f1bad134c985dbe1f272d376e5ec9b Mon Sep 17 00:00:00 2001
From: obscuren <geffobscura@gmail.com>
Date: Mon, 3 Mar 2014 11:34:04 +0100
Subject: [PATCH] Updated protocol version to 7

---
 peer.go | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/peer.go b/peer.go
index 970619714..271c8708e 100644
--- a/peer.go
+++ b/peer.go
@@ -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
-- 
GitLab