diff --git a/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs b/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs index 219adaaf2dc..4e547fcaee9 100644 --- a/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs +++ b/src/Nethermind/Nethermind.Core/Extensions/Bytes.cs @@ -277,6 +277,14 @@ public static byte[] PadRight(this byte[] bytes, int length) return result; } + public static byte[] Concat(byte[] part1, byte[] part2) + { + byte[] result = new byte[part1.Length + part2.Length]; + part1.CopyTo(result, 0); + part2.CopyTo(result.AsSpan(part1.Length)); + return result; + } + public static byte[] Concat(params byte[][] parts) { int totalLength = 0;