aboutsummaryrefslogtreecommitdiffstats
path: root/eth/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 /eth/peer.go
parentba3bcd16a6d99bc0e58516556df8e96b730c2d60 (diff)
downloaddexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.gz
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.bz2
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.lz
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.xz
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.tar.zst
dexon-e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80.zip
cmd, eth, les, mobile: make networkid uint64 everywhere
Diffstat (limited to 'eth/peer.go')
-rw-r--r--eth/peer.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/peer.go b/eth/peer.go
index 6884fee8e..42ead5396 100644
--- a/eth/peer.go
+++ b/eth/peer.go
@@ -230,7 +230,7 @@ func (p *peer) RequestReceipts(hashes []common.Hash) error {
// Handshake executes the eth protocol handshake, negotiating version number,
// network IDs, difficulties, head and genesis blocks.
-func (p *peer) Handshake(network int, td *big.Int, head common.Hash, genesis common.Hash) error {
+func (p *peer) Handshake(network uint64, td *big.Int, head common.Hash, genesis common.Hash) error {
// Send out own handshake in a new thread
errc := make(chan error, 2)
var status statusData // safe to read after two values have been received from errc
@@ -238,7 +238,7 @@ func (p *peer) Handshake(network int, td *big.Int, head common.Hash, genesis com
go func() {
errc <- p2p.Send(p.rw, StatusMsg, &statusData{
ProtocolVersion: uint32(p.version),
- NetworkId: uint32(network),
+ NetworkId: network,
TD: td,
CurrentBlock: head,
GenesisBlock: genesis,
@@ -263,7 +263,7 @@ func (p *peer) Handshake(network int, td *big.Int, head common.Hash, genesis com
return nil
}
-func (p *peer) readStatus(network int, status *statusData, genesis common.Hash) (err error) {
+func (p *peer) readStatus(network uint64, status *statusData, genesis common.Hash) (err error) {
msg, err := p.rw.ReadMsg()
if err != nil {
return err
@@ -281,7 +281,7 @@ func (p *peer) readStatus(network int, status *statusData, genesis common.Hash)
if status.GenesisBlock != genesis {
return errResp(ErrGenesisBlockMismatch, "%x (!= %x)", status.GenesisBlock[:8], genesis[:8])
}
- if int(status.NetworkId) != network {
+ if status.NetworkId != network {
return errResp(ErrNetworkIdMismatch, "%d (!= %d)", status.NetworkId, network)
}
if int(status.ProtocolVersion) != p.version {