aboutsummaryrefslogtreecommitdiffstats
path: root/les/peer.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-25 19:31:15 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-04-25 19:53:50 +0800
commite61035c5a3630e4f6fd0fb3e5346a4eed8cedc80 (patch)
tree9dd32e8fb794b4950313ae2b2cd5499bb60dc4cd /les/peer.go
parentba3bcd16a6d99bc0e58516556df8e96b730c2d60 (diff)
downloadgo-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.gz
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.zst
go-tangerine-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.zip
cmd, eth, les, mobile: make networkid uint64 everywhere
Diffstat (limited to 'les/peer.go')
-rw-r--r--les/peer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/les/peer.go b/les/peer.go
index f45605593..ab55bafe3 100644
--- a/les/peer.go
+++ b/les/peer.go
@@ -48,8 +48,8 @@ type peer struct {
rw p2p.MsgReadWriter
- version int // Protocol version negotiated
- network int // Network ID being on
+ version int // Protocol version negotiated
+ network uint64 // Network ID being on
id string
@@ -69,7 +69,7 @@ type peer struct {
fcCosts requestCostTable
}
-func newPeer(version, network int, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {
+func newPeer(version int, network uint64, p *p2p.Peer, rw p2p.MsgReadWriter) *peer {
id := p.ID()
return &peer{
@@ -384,7 +384,7 @@ func (p *peer) Handshake(td *big.Int, head common.Hash, headNum uint64, genesis
if rGenesis != genesis {
return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", rGenesis[:8], genesis[:8])
}
- if int(rNetwork) != p.network {
+ if rNetwork != p.network {
return errResp(ErrNetworkIdMismatch, "%d (!= %d)", rNetwork, p.network)
}
if int(rVersion) != p.version {