do not limit client type to white list (#442)

This commit is contained in:
Vyacheslav
2024-03-25 13:13:09 +02:00
committed by GitHub
parent 06578717b5
commit b113b56f62

View File

@@ -55,22 +55,12 @@ abstract class BasicEthLabelsDetector(
} }
private fun clientType(client: String): String? { private fun clientType(client: String): String? {
return if (client.contains("erigon", true)) { val firstSlash = client.indexOf("/")
"erigon" if (firstSlash == -1) {
} else if (client.contains("geth", true)) {
"geth"
} else if (client.contains("bor", true)) {
"bor"
} else if (client.contains("nethermind", true)) {
"nethermind"
} else if (client.contains("prysm", true)) {
"prysm"
} else if (client.contains("lighthouse", true)) {
"lighthouse"
} else {
log.debug("Unknown client type: {}", client) log.debug("Unknown client type: {}", client)
null return null
} }
return client.substring(0, firstSlash).lowercase()
} }
data class NodeTypeRequest( data class NodeTypeRequest(