From e61035c5a3630e4f6fd0fb3e5346a4eed8cedc80 Mon Sep 17 00:00:00 2001 From: Péter Szilágyi Date: Tue, 25 Apr 2017 14:31:15 +0300 Subject: cmd, eth, les, mobile: make networkid uint64 everywhere --- eth/peer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eth/peer.go') 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 { -- cgit