mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Add lighthouse p2p Good Bye codes (#7601)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
70d923cf85
commit
b4c1c1db9b
@ -15,15 +15,28 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// Spec defined codes
|
||||
codeClientShutdown types.SSZUint64 = iota
|
||||
codeWrongNetwork
|
||||
codeGenericError
|
||||
|
||||
// Teku specific codes
|
||||
codeUnableToVerifyNetwork = types.SSZUint64(128)
|
||||
|
||||
// Lighthouse specific codes
|
||||
codeTooManyPeers = types.SSZUint64(129)
|
||||
codeBadScore = types.SSZUint64(250)
|
||||
codeBanned = types.SSZUint64(251)
|
||||
)
|
||||
|
||||
var goodByes = map[types.SSZUint64]string{
|
||||
codeClientShutdown: "client shutdown",
|
||||
codeWrongNetwork: "irrelevant network",
|
||||
codeGenericError: "fault/error",
|
||||
codeClientShutdown: "client shutdown",
|
||||
codeWrongNetwork: "irrelevant network",
|
||||
codeGenericError: "fault/error",
|
||||
codeUnableToVerifyNetwork: "unable to verify network",
|
||||
codeTooManyPeers: "client has too many peers",
|
||||
codeBadScore: "peer score too low",
|
||||
codeBanned: "client banned this node",
|
||||
}
|
||||
|
||||
// Add a short delay to allow the stream to flush before resetting it.
|
||||
|
Loading…
Reference in New Issue
Block a user