diff --git a/src/Nethermind/Nethermind.Core/ProductInfo.cs b/src/Nethermind/Nethermind.Core/ProductInfo.cs index 70a72ab5b2a..9cbf70bb8e9 100644 --- a/src/Nethermind/Nethermind.Core/ProductInfo.cs +++ b/src/Nethermind/Nethermind.Core/ProductInfo.cs @@ -4,8 +4,10 @@ using System; using System.Linq; using System.Reflection; +using System.Runtime.CompilerServices; using System.Runtime.InteropServices; +[assembly: InternalsVisibleTo("Nethermind.Merge.Plugin.Test")] namespace Nethermind.Core; public static class ProductInfo @@ -39,7 +41,7 @@ static ProductInfo() public static string ClientCode { get; } - public static string Commit { get; } + public static string Commit { get; internal set; } public static string Name { get; } diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V1.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V1.cs index bfd1368d636..43b6793f1d1 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V1.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.V1.cs @@ -1520,6 +1520,7 @@ await rpc.engine_forkchoiceUpdatedV1(forkChoiceState1, [Test] public async Task Should_return_ClientVersionV1() { + ProductInfo.Commit = "0000000000000000000000000000000000000000000000000000000000000000"; using MergeTestBlockchain chain = await CreateBlockchain(); IEngineRpcModule rpcModule = CreateEngineModule(chain); ResultWrapper result = rpcModule.engine_getClientVersionV1(new ClientVersionV1()); diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Data/ClientVersionV1.cs b/src/Nethermind/Nethermind.Merge.Plugin/Data/ClientVersionV1.cs index dafad038918..c6e5a853031 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin/Data/ClientVersionV1.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin/Data/ClientVersionV1.cs @@ -16,7 +16,7 @@ public ClientVersionV1() Code = ProductInfo.ClientCode; Name = ProductInfo.Name; Version = ProductInfo.Version; - Commit = ProductInfo.Commit; + Commit = ProductInfo.Commit[..8]; } public string Code { get; }