Skip to content

Commit 10dae77

Browse files
committed
add parsing for reth/base
1 parent a23c25c commit 10dae77

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

pkg/common/parse_client.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,13 @@ func handleLen5(parts []string) (*Client, error) {
543543
os, arch, _ = parseOSArch(parts[2])
544544
lang = "nim"
545545
} else
546+
// handle reth/v1.9.2-74351d9/x86_64-unknown-linux-gnu/base/v0.2.1
547+
if parts[0] == "reth" {
548+
userData = parts[3] + "/" + parts[4]
549+
versionStr = parts[1]
550+
os, arch, _ = parseOSArch(parts[2])
551+
lang = "rust"
552+
} else
546553
// handle geth/v1.2.11-e3acd735-20231031/linux-amd64/go1.20.5/{d+}
547554
if strings.TrimFunc(parts[4], unicode.IsDigit) == "" {
548555
versionStr = parts[1]

pkg/common/parse_client_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,19 @@ func TestParseClientID(t *testing.T) {
184184
Language: "go1.22.2",
185185
},
186186
},
187+
{
188+
name: "reth",
189+
ci: "reth/v1.9.2-74351d9/x86_64-unknown-linux-gnu/base/v0.2.1",
190+
client: &Client{
191+
Name: "reth",
192+
UserData: "base/v0.2.1",
193+
Version: "v1.9.2",
194+
Build: "74351d9",
195+
OS: OSLinux,
196+
Arch: ArchAMD64,
197+
Language: "rust",
198+
},
199+
},
187200
}
188201

189202
for _, test := range tt {

0 commit comments

Comments
 (0)