@@ -230,15 +230,15 @@ func (p *peer) RequestReceipts(hashes []common.Hash) error {
230230
231231// Handshake executes the eth protocol handshake, negotiating version number,
232232// network IDs, difficulties, head and genesis blocks.
233- func (p * peer ) Handshake (network int , td * big.Int , head common.Hash , genesis common.Hash ) error {
233+ func (p * peer ) Handshake (network uint64 , td * big.Int , head common.Hash , genesis common.Hash ) error {
234234 // Send out own handshake in a new thread
235235 errc := make (chan error , 2 )
236236 var status statusData // safe to read after two values have been received from errc
237237
238238 go func () {
239239 errc <- p2p .Send (p .rw , StatusMsg , & statusData {
240240 ProtocolVersion : uint32 (p .version ),
241- NetworkId : uint32 ( network ) ,
241+ NetworkId : network ,
242242 TD : td ,
243243 CurrentBlock : head ,
244244 GenesisBlock : genesis ,
@@ -263,7 +263,7 @@ func (p *peer) Handshake(network int, td *big.Int, head common.Hash, genesis com
263263 return nil
264264}
265265
266- func (p * peer ) readStatus (network int , status * statusData , genesis common.Hash ) (err error ) {
266+ func (p * peer ) readStatus (network uint64 , status * statusData , genesis common.Hash ) (err error ) {
267267 msg , err := p .rw .ReadMsg ()
268268 if err != nil {
269269 return err
@@ -281,7 +281,7 @@ func (p *peer) readStatus(network int, status *statusData, genesis common.Hash)
281281 if status .GenesisBlock != genesis {
282282 return errResp (ErrGenesisBlockMismatch , "%x (!= %x)" , status .GenesisBlock [:8 ], genesis [:8 ])
283283 }
284- if int ( status .NetworkId ) != network {
284+ if status .NetworkId != network {
285285 return errResp (ErrNetworkIdMismatch , "%d (!= %d)" , status .NetworkId , network )
286286 }
287287 if int (status .ProtocolVersion ) != p .version {
0 commit comments