diff --git a/src/Nethermind/Nethermind.Core/ProductInfo.cs b/src/Nethermind/Nethermind.Core/ProductInfo.cs index 85ecf6f451a..b23e63c3006 100644 --- a/src/Nethermind/Nethermind.Core/ProductInfo.cs +++ b/src/Nethermind/Nethermind.Core/ProductInfo.cs @@ -25,16 +25,14 @@ static ProductInfo() OS = Platform.GetPlatformName(); OSArchitecture = RuntimeInformation.OSArchitecture.ToString().ToLowerInvariant(); Runtime = RuntimeInformation.FrameworkDescription; + Version = versionAttr.InformationalVersion; - var version = versionAttr.InformationalVersion; - var index = version.IndexOf('+', StringComparison.Ordinal); + var index = Version.IndexOf('+', StringComparison.Ordinal); - if (index == -1) - Version = version; - else + if (index != -1) { - Commit = version[(index + 1)..]; - Version = version[..Math.Min(index + 9, version.Length - 1)]; + Commit = Version[(index + 1)..]; + Version = Version[..Math.Min(index + 9, Version.Length - 1)]; } ClientId = $"{Name}/v{Version}/{OS.ToLowerInvariant()}-{OSArchitecture}/dotnet{Runtime[5..]}";