mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "p2p/discover: swap verification order in discv4 ping handler (#27532)"
This reverts commit 66d41a44f8.
This commit is contained in:
parent
a12cc85feb
commit
4c01cd8705
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue