p2p/discover: implement v5.1 wire protocol (#21647)
This change implements the Discovery v5.1 wire protocol and also adds an interactive test suite for this protocol.
This commit is contained in:
@ -23,3 +23,11 @@ func IsTemporaryError(err error) bool {
|
||||
})
|
||||
return ok && tempErr.Temporary() || isPacketTooBig(err)
|
||||
}
|
||||
|
||||
// IsTimeout checks whether the given error is a timeout.
|
||||
func IsTimeout(err error) bool {
|
||||
timeoutErr, ok := err.(interface {
|
||||
Timeout() bool
|
||||
})
|
||||
return ok && timeoutErr.Timeout()
|
||||
}
|
||||
|
Reference in New Issue
Block a user