Skip to content

Commit

Permalink
Fix commit in ClientVersionV1 to have only 4 bytes of info following …
Browse files Browse the repository at this point in the history
…the spec (#7013)
  • Loading branch information
smartprogrammer93 authored May 14, 2024
1 parent 4bb0df2 commit bfd7c95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Nethermind/Nethermind.Core/ProductInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<ClientVersionV1[]> result = rpcModule.engine_getClientVersionV1(new ClientVersionV1());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down

0 comments on commit bfd7c95

Please sign in to comment.