Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Nethermind/Nethermind.Core/InvalidBlockHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ namespace Nethermind.Core;

public static class InvalidBlockHelper
{
public static string GetMessage(Block? block, string reason)
{
return $"Rejected invalid block {block?.ToString(Block.Format.FullHashNumberAndExtraData)}, reason: {reason}";
}
public static string GetMessage(Block? block, string reason) =>
$"Rejected invalid block {block?.ToString(Block.Format.FullHashNumberAndExtraData)}, reason: {reason}";
}
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public async Task<ResultWrapper<PayloadStatusV1>> HandleAsync(ExecutionPayload r
{
if (!_blockValidator.ValidateOrphanedBlock(block!, out string? error))
{
if (_logger.IsWarn) _logger.Warn(InvalidBlockHelper.GetMessage(block, "orphaned block is invalid"));
if (_logger.IsWarn) _logger.Warn(InvalidBlockHelper.GetMessage(block, $"orphaned block is invalid: {error}"));
return NewPayloadV1Result.Invalid(null, $"Invalid block without parent: {error}.");
}

Expand Down