Skip to content

Commit aebc339

Browse files
committed
fix: statuspacket -> statuspacket68
Signed-off-by: Ji Hwan <jkim@polygon.technology>
1 parent 38dfadb commit aebc339

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

p2p/protocol.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func NewEthProtocol(version uint, opts EthProtocolOptions) ethp2p.Protocol {
126126
}
127127

128128
c.headMutex.RLock()
129-
status := eth.StatusPacket{
129+
status := eth.StatusPacket68{
130130
ProtocolVersion: uint32(version),
131131
NetworkID: opts.NetworkID,
132132
Genesis: opts.GenesisHash,
@@ -198,11 +198,11 @@ func NewEthProtocol(version uint, opts EthProtocolOptions) ethp2p.Protocol {
198198

199199
// statusExchange will exchange status message between the nodes. It will return
200200
// an error if the nodes are incompatible.
201-
func (c *conn) statusExchange(packet *eth.StatusPacket) error {
201+
func (c *conn) statusExchange(packet *eth.StatusPacket68) error {
202202
errc := make(chan error, 2)
203203

204204
go func() {
205-
c.countMsgSent((&eth.StatusPacket{}).Name(), 1)
205+
c.countMsgSent((&eth.StatusPacket68{}).Name(), 1)
206206
errc <- ethp2p.Send(c.rw, eth.StatusMsg, &packet)
207207
}()
208208

@@ -244,7 +244,7 @@ func (c *conn) countMsgSent(messageName string, count float64) {
244244
c.countMsg(MsgSent, messageName+PacketSuffix, 1)
245245
}
246246

247-
func (c *conn) readStatus(packet *eth.StatusPacket) error {
247+
func (c *conn) readStatus(packet *eth.StatusPacket68) error {
248248
msg, err := c.rw.ReadMsg()
249249
if err != nil {
250250
return err
@@ -254,7 +254,7 @@ func (c *conn) readStatus(packet *eth.StatusPacket) error {
254254
return errors.New("expected status message code")
255255
}
256256

257-
var status eth.StatusPacket
257+
var status eth.StatusPacket68
258258
err = msg.Decode(&status)
259259
if err != nil {
260260
return err

p2p/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func (msg Pong) Code() int { return 0x03 }
7777
func (msg Pong) ReqID() uint64 { return 0 }
7878

7979
// Status is the network packet for the status message for eth/64 and later.
80-
type Status eth.StatusPacket
80+
type Status eth.StatusPacket68
8181

8282
func (msg Status) Code() int { return 16 }
8383
func (msg Status) ReqID() uint64 { return 0 }

0 commit comments

Comments
 (0)