diff --git a/beacon-chain/sync/rpc_goodbye.go b/beacon-chain/sync/rpc_goodbye.go index 85366db46128..d911c0a090aa 100644 --- a/beacon-chain/sync/rpc_goodbye.go +++ b/beacon-chain/sync/rpc_goodbye.go @@ -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.