aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-10 18:45:08 +0800
committerobscuren <geffobscura@gmail.com>2014-02-10 18:45:08 +0800
commit1d26ae2deaeb9e8995e923018db432eb64b764c5 (patch)
tree49acec45478ee3253d97e032d76b7fb8f7bfd8e3 /peer.go
parentd2edc2bbf4641f3ca2ccf33e9014892d342ad021 (diff)
downloaddexon-1d26ae2deaeb9e8995e923018db432eb64b764c5.tar.gz
dexon-1d26ae2deaeb9e8995e923018db432eb64b764c5.tar.zst
dexon-1d26ae2deaeb9e8995e923018db432eb64b764c5.zip
Changed client id
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/peer.go b/peer.go
index e7be3bcb0..04dd24e93 100644
--- a/peer.go
+++ b/peer.go
@@ -2,11 +2,13 @@ package eth
import (
"bytes"
+ "fmt"
"github.com/ethereum/ethchain-go"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethwire-go"
"log"
"net"
+ "runtime"
"strconv"
"strings"
"sync/atomic"
@@ -438,8 +440,9 @@ func (p *Peer) Stop() {
}
func (p *Peer) pushHandshake() error {
+ clientId := fmt.Sprintf("/Ethereum(G) v%s/%s", ethutil.Config.Ver, runtime.GOOS)
msg := ethwire.NewMessage(ethwire.MsgHandshakeTy, []interface{}{
- uint32(3), uint32(0), "/Ethereum(G) v0.0.1/", byte(p.caps), p.port, p.pubkey,
+ uint32(3), uint32(0), clientId, byte(p.caps), p.port, p.pubkey,
})
p.QueueMessage(msg)