Skip to content

Commit

Permalink
Merge pull request #527 from Fantom-foundation/fix/networkid-handshake
Browse files Browse the repository at this point in the history
Fix: network id handshake
  • Loading branch information
uprendis committed Nov 10, 2023
2 parents 19c1a95 + 16a215a commit f171185
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gossip/peer.go
Expand Up @@ -494,7 +494,7 @@ func (p *peer) Handshake(network uint64, progress PeerProgress, genesis common.H
// send both HandshakeMsg and ProgressMsg
err := p2p.Send(p.rw, HandshakeMsg, &handshakeData{
ProtocolVersion: uint32(p.version),
NetworkID: 0, // TODO: set to `network` after all nodes updated to #184
NetworkID: network,
Genesis: genesis,
})
if err != nil {
Expand Down Expand Up @@ -541,7 +541,7 @@ func (p *peer) readStatus(network uint64, handshake *handshakeData, genesis comm
return errResp(ErrDecode, "msg %v: %v", msg, err)
}

// TODO: rm after all the nodes updated to #184
// TODO: rm after all the nodes updated to #527
if handshake.NetworkID == 0 {
handshake.NetworkID = network
}
Expand Down

0 comments on commit f171185

Please sign in to comment.