Skip to content

Commit

Permalink
add caplin client type
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Aug 12, 2024
1 parent 7c87d1d commit 0256dee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clients/consensus/clienttype.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var (
PrysmClient ClientType = 4
TekuClient ClientType = 5
GrandineClient ClientType = 6
CaplinClient ClientType = 7
)
var clientTypePatterns = map[ClientType]*regexp.Regexp{
LighthouseClient: regexp.MustCompile("(?i)^Lighthouse/.*"),
Expand All @@ -24,6 +25,7 @@ var clientTypePatterns = map[ClientType]*regexp.Regexp{
PrysmClient: regexp.MustCompile("(?i)^Prysm/.*"),
TekuClient: regexp.MustCompile("(?i)^teku/.*"),
GrandineClient: regexp.MustCompile("(?i)^Grandine/.*"),
CaplinClient: regexp.MustCompile("(?i)^Caplin/.*"),
}

func (client *Client) parseClientVersion(version string) {
Expand Down Expand Up @@ -51,6 +53,8 @@ func ParseClientType(name string) ClientType {
return TekuClient
case "grandine":
return GrandineClient
case "caplin":
return CaplinClient
default:
return UnknownClient
}
Expand All @@ -74,6 +78,8 @@ func (clientType ClientType) String() string {
return "teku"
case GrandineClient:
return "grandine"
case CaplinClient:
return "caplin"
default:
return fmt.Sprintf("unknown: %d", clientType)
}
Expand Down

0 comments on commit 0256dee

Please sign in to comment.