Skip to content

Commit

Permalink
Revert "p2p/discover: swap verification order in discv4 ping handler (e…
Browse files Browse the repository at this point in the history
…thereum#27532)"

This reverts commit 66d41a4.
  • Loading branch information
devopsbo3 committed Nov 10, 2023
1 parent a12cc85 commit 4c01cd8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions p2p/discover/v4_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,13 +643,13 @@ type packetHandlerV4 struct {
func (t *UDPv4) verifyPing(h *packetHandlerV4, from *net.UDPAddr, fromID enode.ID, fromKey v4wire.Pubkey) error {
req := h.Packet.(*v4wire.Ping)

if v4wire.Expired(req.Expiration) {
return errExpired
}
senderKey, err := v4wire.DecodePubkey(crypto.S256(), fromKey)
if err != nil {
return err
}
if v4wire.Expired(req.Expiration) {
return errExpired
}
h.senderKey = senderKey
return nil
}
Expand Down

0 comments on commit 4c01cd8

Please sign in to comment.