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 (
|
const (
|
||||||
|
// Spec defined codes
|
||||||
codeClientShutdown types.SSZUint64 = iota
|
codeClientShutdown types.SSZUint64 = iota
|
||||||
codeWrongNetwork
|
codeWrongNetwork
|
||||||
codeGenericError
|
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{
|
var goodByes = map[types.SSZUint64]string{
|
||||||
codeClientShutdown: "client shutdown",
|
codeClientShutdown: "client shutdown",
|
||||||
codeWrongNetwork: "irrelevant network",
|
codeWrongNetwork: "irrelevant network",
|
||||||
codeGenericError: "fault/error",
|
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.
|
// Add a short delay to allow the stream to flush before resetting it.
|
||||||
|
Loading…
Reference in New Issue
Block a user